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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Setting Bamboo build plan result from script variable

I am using JUNIT parser and want to set the build result to pass if more than 90% of the test cases have passed and fail it if the test case passed are less than 90%.

 

to achieve this i can use the Final task which will execute in all cases. How do it set the build result from the script task that I'll add to Final Task.

1 answer

0 votes

If Script task returns non zero exit code then Bamboo fill fail job. 

I want to set the build result from a script task. I understand that the build will pass or fail based on the exit code of script task, but that's not the problem here.

 

I just want to set the build state from script task to SUCCESS.

Nothing outside of build can't set its state (unless supported by plugin).

In your case I'd suggest to analyze test XML results in script task and depending on amount of failed cases exit with 0 or 1

If you use Junit test parser task then build will fail if there's at least 1 failed test

I read on a forum somewhere that it's possible using REST API curl command, is it?

I'm not aware of any REST call to achieve it.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

694 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you