Configuring Approval Gates Step
To enable Approval Gates, add a new section to your step configuration named
requiresApprovalsection to your step configuration.
Using The Defaults
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:
- approvers: Any user with execute permissions can approve or reject a Pending Approval step.
- notifications: No notifications are sent.
- timeoutSeconds: Defaults to 86400 seconds (24 hours), after which the step is canceled automatically.
Customizing Your Configuration
Alternatively, you can define your own
requiresApproval configuration section and define the following:
- approvers: A list of Artifactory user names that can approve or reject the step.
- notifications: A list of SMTP and Slack integrations. Based on the configuration, SMTP and Slack notifications are sent when the step goes into Pending Approval status.
- The listed name for the notifications integration should be an existing SMTP Credentials Integration or Slack Integration.
- The SMTP Credentials Integration requires a list of e-mail recipients to which an approval request will be sent.
- A Slack Integration does not require a list of recipients, since the webhook URL defined in the integration already points to a Slack user or channel to which the notification will be sent.
- timeoutSeconds: A window of time, in seconds, in which the approvers can approve or reject the step. If no response is recorded during this timeout period, the step is canceled automatically.
requiresApprovalconfiguration section. If you do not include one of the sections, this section defaults to the behavior defined above. For example, if you do not provide a configuration for
requiresApproval.timeoutSeconds, it defaults to 86400 seconds (24 hours).
- The first user that responds from the approvers' list determines if the step is approved or rejected.
- Pipelines Admins can approve or reject the step without being listed on the approvers' list.
- Artifactory transient users are currently not supported as approvers.
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:
- Go to Applications | My Pipelines and click the relevant pipeline.
This displays Pipeline Run page and you'll see the Approval step (called
approvalGatesStepin the example yaml above) in Pending status.
- Click the Pending step in the Steps view to go to the step page.
This displays the Approve/Reject button for the step.
- Click the Approve/Reject button to reveal the following options:
- Approve/Reject button: Click to approve or reject the step.
- Comments field: This optional field enables you to add a meaningful comment for approving or rejecting the step. This has a 100 characters limit.
- Approvers list: This lists the first letter of Artifactory usernames for users who were listed as approvers in the pipelines yaml. Hovering over a letter shows the full Artifactory username.
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.