You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kris,
Out of curiosity: were you able to pinpoint the issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.