Rollback pipelines
Rollback pipelines to handle different failure conditions.
Pipeline rollback is a type of failure strategy that allows you to roll back the entire pipeline upon stage or step failure.
Configure a rollback failure strategy
In your pipeline, go to the step or stage where you want the rollback strategy to be triggered if that step or stage fails.
Go to the Advanced settings for the selected step or stage.
under Failure Strategy, locate On failure of type, and select the error type that you want to trigger the rollback.
Under Perform Action, select Rollback Pipeline.
Here's an example of the YAML for a pipeline rollback failure strategy that triggers on any error.
failureStrategies:
- onFailure:
errors:
- AllErrors
action:
type: PipelineRollbackDuring pipeline execution, if the failure event occurs that triggers the rollback failure strategy, all steps and stages are rolled back accordingly.
If a pipeline uses pipeline chaining (where one or more stages are actually other pipelines), rolling back the parent pipeline does not roll back the child pipeline, because the child pipeline is considered a separate pipeline execution. In such cases, only the deployment stages of the parent pipeline roll back.
Last updated
Was this helpful?