Bamboo plan status - showing failed but it was success

I have a bamboo plan with stages 1, 2 and 3, that run in that order.

I expect stage 1 and stage 2 to fail and stage 3 to succeed. This to me is a successful build.

I expect stage 1 and stage 2 to fail but if stage 3 fails, then this to me is a failed build.

In both the above scenarios, bamboo shows the build as a failed build (indicated in red).

Is there anyway to over-ride the build status and show the first scenario (i.e. expect stage 1 and stage 2 to fail and stage 3 to succeed), as a successful build (indicated in green) (my user base seeing red will assume there is something wrong when there may not necessarily be)?

 

1 answer

0 vote

This is not possible with Bamboo, because stages are executed sequentially by definition, see Plan within How is a Bamboo workflow organized?:

  • Has a single stage, by default, but can be used to group jobs into multiple stages.
  • Processes a series of one or more stages that are run sequentially using the same repository.
  • [...]

Once a stage fails, Bamboo stops processing the plan, i.e. you cannot build any subsequent stages.

The unit of parallelism within a plan are jobs, see Stage within How is a Bamboo workflow organized?:

  • Has a single job, by default, but can be used to group multiple jobs.
  • Processes its jobs in parallel, on multiple agents (where available).
  • Must successfully complete all its jobs before the next stage in the plan can be processed.
  • [...]

However, even though all jobs within a stage are always executed regardless of whether their siblings failed or succeeded, the stage (and in turn the plan) are still considered failing if only a single job failed.

I'm not aware of any way to achieve a green build under these circumstances, so you would need to refactor or amend your build strategy to eventually achieve the desired semantics. For example, Atlassian has recently releases the Bamboo Fail Build Trigger that can Trigger plans when another plan fails. Maybe you could use that to trigger a plan that checks the outcome of its dependencies via the REST API (this might be non trivial though) and succeeds, if at least one stage succeeded?

 

 

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,096 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot