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?
Welcome to your weekly Jira Ops Early access program update, where we’re sharing news and updates on Jira Ops' progress as we work toward our 1.0 release. If you ever want to drop us feedback or idea...
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!
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