Of a series of steps that are running in parallel, I 'd like the entire build to stop and fail if any of them fails first. This way I don’t have to wait for other lengthier tests to all finish.
I know right now the build is marked as failed but I don’t want that. I want the build to actually stop
Is there a feature for that?
thanks
Hi there
Is there also the option to fail the build from a specific step only?
For example, I have a build step and if that one fails I want to fail and stop all other steps but if any of the tests fail I don’t want to the rest of the build.
There are several things that can help to achieve this behaviour.
A Build should stop if the step fails, except if it has a soft_fail attribute set to true or for a specific exit code as seen in Soft_fail Attributes.
Adding a wait step creates an implicit dependency. A wait step waits for all previous steps to have successfully completed before allowing following jobs to continue. To bypass this you would need to set continue_on_failure: true as in our documentation
Another way to do this is by using the depends_on attribute. This creates an explicit dependency, so if that step fails, the dependent steps will not run. This step will only run after the named steps have completed. Link
At the job level, setting cancel_on_build_failing attribute to true cancels the job as soon as the build is marked as failing.