Skip to main content

Abort a pipeline, stage, or step

This topic explains how to stop an in-progress pipeline, stage, or step. Take care when using this option as it can have additional impacts.

Required permissions

To abort a pipeline, stage, or step, you need permission to abort pipelines. There are two primary ways you can configure this with Harness RBAC:

  • Pipeline Execute permission: By default, this permission grants you the ability to initiate and interact with pipeline executions, including running pipelines, aborting pipelines and pipeline components (stages and steps), retrying/rerunning pipelines, and so on.
  • (Beta) Abort permission: To control the Abort permission separately from other pipeline execute functions, you can enable the Feature Flag CDS_PIPELINE_ABORT_RBAC_PERMISSION by contacting Harness Support.
    • Enabling this feature flag can take several days because it requires migrating your existing users to this permissions structure.
    • If the Abort permission isn't listed in your account's RBAC settings, then your account is using the default Pipeline Execute permission functionality to control all pipeline execution functions (run, abort, retry, and so on).

Permissions are contained in roles, which can be narrowly scoped, such as the Pipeline Executor role, or broadly scoped, like the Account Admin role.

Abort a pipeline

When you abort a pipeline:

  • The pipeline finish executing the current task and then stops.
  • The pipeline status becomes Aborted.
  • Harness does not clean up resources that were created during pipeline execution, such as pods.
warning

Abort pipelines as a last resort. The abort action stops the pipeline execution and causes the pipeline to end execution in an aborted state. This prevents end-of-pipeline cleanup tasks from happening and can leave infrastructure in an unresolved state.

To terminate a running pipeline, go to the pipeline's execution details, select More Options (⋮), and then select Abort Pipeline.

Abort a stage

When you abort a stage:

  • The stage finishes executing the current task and then stops. Then the pipeline stops, and the pipeline status becomes Aborted. Stages after the aborted stage do not run.
  • Harness does not clean up resources that were created during stage execution, such as pods.

To terminate a running stage in a running pipeline, go to the pipeline's execution details, select the stage you want to terminate, and select the Stop icon next to the stage name.

tip

To clean up the workspace and revert back to the old state, mark the stage as failed.

Abort a step

You can initiate an abort on the Verify step. For more information, go to Abort verification.