To enable Approval Gates, add a new section to your step configuration named
|By default, Approval Gates is disabled. To enable it, add the |
To enable Approval Gates and use the default values for a step, add the
requiresApproval flag to your step configuration and set it as
In this case, the following defaults are applied to the Pending Approval step:
pipelines: - name: MyApprovalGatesPipeline steps: - name: approvalGatesStep type: Bash configuration: requiresApproval: true execution: onExecute: - echo "executing step..."
Alternatively, you can define your own
requiresApproval configuration section and define the following:
|You do not have to include all 3 sections when customizing a step's |
pipelines: - name: MyApprovalGatesPipeline steps: - name: approvalGatesStep type: Bash configuration: requiresApproval: timeoutSeconds: 43200 # if not approved in this timeframe, the step will be cancelled approvers: - user1 # must be a valid Artifactory user - user2 # must be a valid Artifactory user notifications: - integrationName: SMTP_Integration # requires SMTP integration recipients: - firstname.lastname@example.org - integrationName: Slack_Integration # required Slack integration execution: onExecute: - echo "executing step..."
After a step moves to Pending Approval state, the approvers can approve or reject the step using the user interface.
To approve or reject a step:
approvalGatesStepin the example yaml above) in Pending status.
Approving the step moves it from Pending Approval status to Waiting status. The step then gets picked up for execution by the next available execution node.
Rejecting the step moves it from Pending Approval status to Cancelling status, and eventually the step moves to Cancelled status.