Can I stop an entire pipeline from a script in a step without having it fail?
In our case we have multiple triggers for a pipeline, but it only has to run in a specific case, when all other processes have finished.
I would like to stop all other steps if the check fails in the first step without failing the pipeline, because this is a known stop and therefore should not trigger a failed status.
My current alternative is to do the check on the start of each step, which works, but does not indicate stoped in the overview of the pipeline and is inefficient.
Hope someone can help!
Thanks in advance.
I would also be interested in a solution to this. Currently I've worked around it by merging my steps in a single script that does the initial check. If conditions aren't met it simply exits. Otherwise it continues calling each subsequent step scripts.
The downside is that from the UI I only get the 1 step without being able to really trace individual steps or configuring them separately with size, cache max-time etc.
As an update I just want to mention that in the end, I reverted the solution mentioned above to instead pass data between my steps using artifacts as per https://community.atlassian.com/t5/Bitbucket-questions/Is-there-a-way-of-sharing-data-between-steps-in-bitbucket/qaq-p/777977
In my conditional step I do the needed checks and store the result in an artifact e.g. "runTests". Then in the subsequent steps I check for if that artifact exists before continuing with the step. If it doesn't the step script is completed without having to fail.
It's not optimal as you also point out, in that you still have the step boot up overhead but it's the only solution I've found so far.
Calling all Confluence Cloud Admins! We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events