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)?
This is not possible with Bamboo, because stages are executed sequentially by definition, see Plan within How is a Bamboo workflow organized?:
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?:
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.