Bamboo plan status - showing failed but it was success

Owen Kilker August 15, 2016

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 votes
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 15, 2016

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 Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events