Bamboo plan status - showing failed but it was success
Asked by Owen Kilker:

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)?


Answers:
author: Steffen Opel _Utoolity_
body: This is not possible with Bamboo, because stages are executed sequentially by definition, see *Plan* within [How is a Bamboo workflow organized?:](https://confluence.atlassian.com/bamboo/understanding-the-bamboo-ci-server-289277285.html#UnderstandingtheBambooCIServer-HowisaBambooworkfloworganized?)
> * Has a single [stage](https://confluence.atlassian.com/bamboo/stage-289277455.html), by default, but can be used to group [jobs](https://confluence.atlassian.com/bamboo/job-289277456.html) 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.

* ![information](/html/@4DF2F60CA30FBCA0CD7B960B5D0F871B/images/emoticons/information.png "information") You might also be interested in [Bamboo Best Practice - Using stages](https://confluence.atlassian.com/bamboo/bamboo-best-practice-using-stages-388401113.html).

The unit of parallelism within a plan are jobs, see *Stage* within [How is a Bamboo workflow organized?](https://confluence.atlassian.com/bamboo/understanding-the-bamboo-ci-server-289277285.html#UnderstandingtheBambooCIServer-HowisaBambooworkfloworganized?):
> * Has a single [job](https://confluence.atlassian.com/bamboo/job-289277456.html), by default, but can be used to group multiple jobs.
> * Processes its jobs in **parallel** , on **multiple** [agents](https://confluence.atlassian.com/bamboo/agent-289277442.html) (where available).
> * Must successfully complete all its jobs before the next [stage](https://confluence.atlassian.com/bamboo/stage-289277455.html) in the [plan](https://confluence.atlassian.com/bamboo/plan-289277457.html) 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](https://marketplace.atlassian.com/plugins/com.atlassianlab.bamboo.plugins.bamboo-fail-trigger/overview) 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?