Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,666
Community Members
 
Community Events
184
Community Groups

Is there a list of Bamboo exit codes

I've been assigned to get a Bamboo build plan running. Last time this ran successfully was back in 2018. Here in 2021, it is aborting with the following message.

 

build           06-Aug-2021 11:17:48 PHPUnit 4.8.36 by Sebastian Bergmann and contributors.

build           06-Aug-2021 11:17:48

build           06-Aug-2021 11:17:48 Runtime:    PHP 7.4.21 with Xdebug 3.0.4

build           06-Aug-2021 11:17:48 Configuration:               /home/cmbuild/bamboo-agent-home/xml-data/build-dir/DER-QDB-JOB1/xr/AutomatedTesting/xr/phpunit.xml

build           06-Aug-2021 11:17:48

build           06-Aug-2021 11:17:48 Code coverage needs to be enabled in php.ini by setting 'xdebug.mode' to 'coverage'

simple         06-Aug-2021 11:17:48 Failing task since return code of [/bin/sh /home/cmbuild/bamboo-agent-home/temp/DER-QDB-JOB1-232-ScriptBuildTask-727917307105596510.sh] was 2 while expected 0

simple         06-Aug-2021 11:17:48 Finished task 'Run PHP UnitTests' with result: Failed

 

I'm no wizard with Bamboo, and I know there's a lot to focus on with what I included above, but I want to focus on this statement:

simple         06-Aug-2021 11:17:48 Failing task since return code of [/bin/sh /home/cmbuild/bamboo-agent-home/temp/DER-QDB-JOB1-232-ScriptBuildTask-727917307105596510.sh] was 2 while expected 0

In addition to resolving the error, I'm learning. I'm investigating these error codes. So, I asked our Bamboo admins for assistance on these error codes, I received the following:

 

Failing task since return code of [/bin/sh /home/cmbuild/bamboo-agent-home/temp/DER-QDB-JOB1-232-ScriptBuildTask-727917307105596510.sh] was 2 while expected 0

 

If we split the URL

  1. /bin/sh
    1. is an executable the represents the system Shell (Bash)
  2. home/cmbuild/bamboo-agent-home/temp/DER-QDB-JOB1-232-ScriptBuildTask-727917307105596510.sh
    1. The above path represents the location where exactly your build is working in the Server/Agent i.e, your code is downloaded into this path and is getting build.
    2. Only admins have access to view.
  3. was 2 while expected 0
    1. 2, 0 are codes, there are referred to as Bamboo Exit codes. Bamboo publicly provides a list of exit codes to describe the error precisely in the form of codes.
    2. Please find the exit codes over the internet.

 

As suggested, I searched for these 'exit codes' and I cannot find them. I can find posts on how to call them, bypass them, change them, not a list of the codes and their descriptions. Perhaps I'm not understanding the admin's response, or using the correct search key words. 

 

Bottom line, here's my question;

Is there a list of Bamboo exit codes? If so, where can I find them? Maybe, these exit codes are unique to the object or routine being executed, and not to Bamboo?

 

I apologize for the length of my question. I thought it helpful to provide as much context as possible.

Thanks in advance for help anyone can provide.

 

Here's my script from the Bamboo plan:

cd ${bamboo_build_working_directory}/xr/AutomatedTesting/xr/

../../vendor/bin/phpunit -c phpunit.xml --verbose --log-junit results/xr_results.xml --coverage-clover=results/xr_coverage.xml phpunit

1 answer

1 vote
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 23, 2021

Hi Kris,

There is no list of Bamboo build exit codes that I'm aware of.

In addition to resolving the error, I'm learning. I'm investigating these error codes. So, I asked our Bamboo admins for assistance on these error codes, I received the following:

You're right about that.

So you will need to find out why phpunit exits with 2.

What I often do when troubleshooting those kinds of issues is running every command from the build manually on the build agent one by one.
You could also try enabling more logging for phpunit. There's probably a flag for that.

Thank you for the input. My next step was to manually run the command. I found the initial PHP program which gets executed. I was going to execute that manually and review the output.

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 31, 2021

Hi Kris,

Out of curiosity: were you able to pinpoint the issue?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events