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

How does Bamboo determine whether a script task failed?

I have a script task which runs successfully but Bamboo regards it as a failure. I can't find any documentation saying how Bamboo decides whether it is a success or failure. I'm pretty sure the exit code is 0.

here's some suggestion in some places that Bamboo will look for certain words in the logs or maybe at the end of the logs but nothing mentioned matches my situation.

Is there a clear answer anywhere saying exactly how Bamboo determines if a task was successful? Or is there any way to find out why Bamboo deemed a particular task to be a failure?

1 answer

1 accepted

2 votes
Answer accepted
robhit
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 21, 2018 • edited Feb 22, 2018

Hi J,

Thanks for your question!

Bamboo indeed depends on the exit status code return by the script execution. You can find this code in the bamboo build logs. Look for the task which contains the script task when it gets completed. The exit code is thrown in the log message.

Here are few short build log snippets:

When Success:

simple	16-Feb-2018 09:27:26	Starting task 'Script' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
simple	16-Feb-2018 09:27:26	Finished task 'Script' with result: Success

 When Failure:

simple	22-Feb-2018 08:19:49	Starting task 'Script' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
simple	22-Feb-2018 08:19:49	Failing task since return code of [/Users/robhit_saxena/Atlassian/Bamboo-Instances/Bamboo-Instances-Homes/BAM-6.2.3/temp/PR22J-PLSC-RUN-6-ScriptBuildTask-1007111759114555860.sh] was 255 while expected 0
simple	22-Feb-2018 08:19:49	Finished task 'Script' with result: Failed

 

Hope this will help.

Thanks,

Robhit

Hi  

I'm facing same issue during deployment may I know what is the issue causing and  resolution for that

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events