For the complete documentation index, see llms.txt. This page is also available as Markdown.

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


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:

  1. In your pipeline, navigate to the step or stage where you want the rollback strategy to be triggered if that step or stage fails.

  2. Click Advanced.

  3. Under Failure Strategy, locate On failure of type, and select the error type that you want to trigger the rollback.

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


Next steps

Last updated

Was this helpful?