Skip to main content

Using manual Harness approval steps in CD stages

This topic describes how to enable Harness user group(s) to approve or reject a stage at any point in its execution.

During deployment, the user group members use the Harness Manager to approve or reject the deployment manually.

Approvals are usually added in between stage steps to prevent the stage execution from proceeding without an approval.

For example, in a Kubernetes blue green deployment, you might want to add an approval step between the stage deployment step, where the new app version is deployed to the staging environment, and the Swap Primary with Stage step, where production traffic is routed to the pods for the new version.

Add an Approval step in a CD stage

  1. In a CD stage, in Execution, select Add Step.
  2. Select Harness Approval. The Harness Approval settings appear.
  3. Follow the steps in Harness Approval stages to add Approval steps for manual intervention.


Here's a manual approval step during the execution of a pipeline:

An approver can approve or reject the step, stopping the pipeline. The approver can also add comments and define variables for use by subsequent approvers and steps.

Here's a quick video that walks you through setting up and running the step:

Sample YAML

Here's what a manual approval step looks like in YAML:

- step:
type: HarnessApproval
name: Harness Approval Step
identifier: Harness_Approval_Step
timeout: 1d
approvalMessage: Test
includePipelineExecutionHistory: true
- docs
minimumCount: 1
disallowPipelineExecutor: false
- name: foo
defaultValue: bar
isAutoRejectEnabled: false

See also