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,555,307
Community Members
 
Community Events
184
Community Groups

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
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 25, 2019

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.

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 25, 2019

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

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 25, 2019

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?

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 26, 2019

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events