Fast Fail the entire pipeline

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

1 Like

it looks like the best thing i can do is to add this to my lengthy steps:
cancel_on_build_failing

2 Likes

Hey @js-cb
Thanks for reaching out! You can use cancel_on_build_failing: true this will cancel all the jobs that are running in parallel

Cheers!

2 Likes

Thank you @stephanie.atte !

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.

Hey @worxli

There are several things that can help to achieve this behaviour.

  1. 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.

  2. 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

  3. 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

  4. At the job level, setting cancel_on_build_failing attribute to true cancels the job as soon as the build is marked as failing.