Rollback pipelines
Configure pipeline rollback to roll back the entire pipeline upon stage or step failure.
Pipeline rollback is a type of failure strategy that allows you to roll back the entire pipeline upon stage or step failure.
What you will learn from this topic
How to configure a rollback failure strategy for your pipeline.
Before you begin
Pipeline permissions: You must have Execute permissions on pipelines to configure failure strategies. For more information, refer to Manage roles.
Feature flag for non-CD stages: Pipeline Rollback is available by default for Continuous Deployment (CD) steps and stages. For all other stages, pipeline rollback requires the feature flag
CDS_ALLOW_EXPRESSION_RESOLUTION_PIPELINE_ROLLBACK. Contact Harness Support to enable this feature flag.
Configure a rollback failure strategy
Perform the following steps to configure a rollback failure strategy for a step or stage:
In your pipeline, navigate to the step or stage where you want the rollback strategy to be triggered if that step or stage fails.
Click Advanced.
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.

The following YAML example shows a pipeline rollback failure strategy that triggers on any error:
During 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.
Next steps
Define a failure strategy on stages and steps: Configure other failure strategy actions for stages and steps.
Mark pipeline as failed: Manually mark a running pipeline as failed to trigger failure handling.
Last updated
Was this helpful?