We’re excited to introduce a brand new functionality in Bitbucket Pipelines – Step Failure Methods. That is the primary of a set of recent options permitting builders to implement extra complete logic and control-flow inside their CI/CD pipelines.
Failure Methods are designed to offer you specific management over how your pipeline behaves within the occasion that a person step throughout the pipeline fails. This preliminary launch will embrace the ignore
technique, which is especially helpful for complicated pipelines with steps like code styling ideas or informational assessments, the place sure steps failing throughout the pipeline shouldn’t essentially trigger the complete construct to fail.
If a step configured with this technique fails, the step shall be marked as “Failed” within the UI however the failure shall be ignored by the general pipeline and the remaining steps will proceed working. A step that fails utilizing the ignore
technique will not trigger the general pipeline to fail.
Coming quickly we shall be introducing further Failure Methods reminiscent of computerized retries and guide approvals. When you’ve got different methods you wish to see applied, please drop us a remark within the Pipelines Neighborhood House.
Fast begin
To configure the failure technique, you possibly can present the brand new step-level on-fail
choice with a required technique
property.
- step:
// Different choices
on-fail:
technique: ignore
// Different choices
Here’s a full instance, wherein we’ve a primary step containing low-priority flaky assessments with an ignore failure technique configured. Step 2 will at all times be executed whatever the final result of Step 1 and the pipeline’s total outcome will rely solely on Step 2.
pipelines:
default:
- step:
title: 'Step 1'
on-fail:
technique: ignore
script:
- npm flaky-test
- step:
title: 'Step 2'
script:
- npm construct
If the failure technique isn’t configured, the step will default to the present habits, which is able to fail and cease the entire pipeline instantly. You can too use technique: fail
to declare {that a} step is following the default behaviour explicitly if you need.
Visible updates
Now we have additionally applied a spread of visible updates to point the standing of your configured failure technique. If a step fails whereas utilizing technique: ignore
, an Ignored
label shall be proven within the UI, alerting you that the step failure was ignored and that the pipeline execution has continued in response to the Failure Technique configuration.

You can too hover over the step length to examine the failure technique configuration if there’s one.

Compatibility and Limitations
On this launch, we’re bringing the on-fail
choice to each particular person & parallel steps, however with some limitations:
- As of now, the Failure Technique received’t assist deployment steps.
- Rerunning failed steps is not going to rerun the finished steps with ignored failures.
As at all times, when you’ve got any questions, considerations, or suggestions – please get in contact with the workforce by way of the Pipelines Neighborhood House.