Add Manual Pipeline Approvals
You can set up and use a manual approval process to pause a pipeline run, so one or more authorized users can approve executing the rest of its run. This is done in the Pipeline Designer by adding an approval item to the pipeline where you want the pipeline execution to stop so someone with the necessary permissions can approve or reject executing the rest of the pipeline. The pipeline run pauses, while it waits for approvals. Once the approvers approve, the pipeline run resumes building. If the approvers reject, the pipeline run stops and returns a failed status. The project's activity stream displays pipeline approval-related activities when a pipeline pauses for approval, an approver approves or rejects a pipeline, and when the pipeline resumes after approval.
- Configuring the approvers
- Adding the approval item to the pipeline
during design time
See Add a Manual Approval Item to Your Pipeline at Design Time.
- Notifying the approvers that they need to take action
- Approving or rejecting the manual approval during run time
Create a Pipeline Approvers Group for Your Project
The pipeline approvers group lets you approve all manual approval pipelines that are not restricted by specific groups.
An approver is always part of a group. A group of approvers can approve certain pipelines only. Certain pipelines can be approved by certain groups of approvers only.
The approvers in the "Default Approver Group" can approve or reject any Manual Approval pipeline. The default pipeline approvers group is made up of individuals (approvers) who can approve any unrestricted pipeline (a pipeline that doesn't require approval from a specific group). So, you can add approvers to the default group but you can't limit that approval group to any specific pipeline.
To do that, you need to create a group to approve specific pipelines. This group allows you to add both approvers and pipelines. Then later, when you add the Manual Approval item in the pipeline designer, you can designate approvers as required approvers and specify the minimum number of approvers needed to approve the pipeline. See Add a Manual Approval Item to Your Pipeline at Design Time.

Description of the illustration create-approval-delete-group.png
Click the Delete button and remove the group. Otherwise, click Cancel.
Add a Manual Approval Item to Your Pipeline at Design Time
As you're creating your pipeline in the Pipeline Designer, you can add a pipeline approval. You do this by right-clicking on an upstream Job node and selecting the Add Manual Approval context menu item. When the node is added to the pipeline layout, its appearance is quite different from that of a Job node, so it's easy to differentiate between them.
Like a Job item, a Manual Approval item can be used with the fork-join layout pattern. That is, it can be a downstream item of a single upstream Job or a join of multiple upstream Jobs. Once it has been approved, it can trigger a single downstream job or fork multiple downstream jobs. However, although you can join multiple upstream jobs to and fork multiple downstream jobs from an Approval item, you can't use the Approval item itself as one of the joining items.
Note:
If you haven't defined any default approvers yet, you won't be able to use the manual approval functionality with any pipelines, because you can't add any approvers for that pipeline. The default approval group applies to any pipeline. Before you try to add approvals to a pipeline, you must add approvers to the default approvers group so you have a pool of approvers from which you can select when you define approvers for a pipeline in the Pipeline Designer or when you create an approval group and associate it with a specific pipeline (or pipelines).After you add a Manual Approval node to your pipeline layout, you'll be presented with a dialog to configure approvers for your pipeline. If you don't want to configure them now, you can right-click on the approval item later and select the Configure context menu item, which displays the dialog you use to configure approvers.)
- Add or remove one or more approvers (only those who can approve this pipeline).
- View information about the group of approvers, making it easier for you to determine if you're picking up the correct approver.
- If you've selected multiple approvers, you can mark All or n number of approvers to enable approval for the approval item.
- Mark one or more approvers as required. Required approvers must
approve; all other approvers are optional.
That is, if three approvers (approver1, approver2, approver3) are selected and approver2 is marked as required, if at least 2 approvers must approve, then one of those two approvers must be approver2.
If you already configured approvers, when you hover over the Manual Approval node, you can view information about it. If you haven't configured any approvers for the pipeline, the warning marker next to the node indicates that you need to configure approvers. The tooltip you see when you mouse over it provides information that explains how to configure the required approvers.
- You can't create an approval item from the Start node. You can only create it from a job (or jobs) downstream from the Start node.
- You can't configure parallel approvals. If you try, when you attempt to save the configuration, you'll see the message, "Only one manual approval can be in effect at any given point in time. Your pipeline has multiple paths which can result in more than one approval to be active at the same time." Click OK to dismiss.
- You can't have random jobs in the pipeline that aren't connected to start or to approvals or to other downstream jobs. "Pipelines with manual approval cannot have unconnected jobs or approvals. The following jobs or approvals are not connected to start: Job1".
- You can't introduce jobs that bypass the approval(s).
Note:
Currently, you can't resume a pipeline after it has been rejected. You need to address and correct the issue(s) that caused an approver to reject completing the pipeline run and then restart the pipeline and approval process.Approve the Manual Approval when the Pipeline Runs
If you're an approver, you can either approve or reject a Manual Approval action from the Pipeline Run page, where the graph or layout for the pipeline run is displayed. You can also add comments about why you approved or rejected the approval.
Notify the Pipeline Approvers
Pipeline approvers are notified in email that an approval is awaiting their action.
- If you're not an approver, you'll see "Not waiting for your approval. Approvals pending:", followed by a list of the approvers.
- If you're an optional approver, you'll see "Waiting for approval. Go to
pipeline
name
runnumber
" - If you're a required approver, you'll see "You are a required approver. Go
to pipeline
name
runnumber
"
If you’re an approver, you can click Waiting for
approval to go to the Pipeline Run page,
which shows all the approvers, who has already approved, and so on, as shown:
Description of the illustration manualapproval.png
If you approve or reject from here (by right-clicking the Approval node), any comments you supply will be added to the final email that all approvers receive.
Note:
If you are not a required approver and you approve the job (either from here or through email), the pipeline remains paused until all required approvers have signed off. If you reject the job, this run of the pipeline is canceled.- Make sure you verified your email address or you won't receive
any VB Studio email notifications at all.
You don't want to see this message.
- Make sure you enabled notifications for Build activities and that you're
also set up to include your own updates.
The check boxes encircled in red need to be selected.
To check both items, click the user avatar and select Preferences. See Configure Your Global Email Notifications for additional information about these items that you need to check and potentially address.
Click on link in email and it'll take you to the pipeline's Run page or
from the Build page's Pipeline Queue tab go to the
Waiting for approval link in the Progress column. Because
you're the approver, you can see the link. If you're not one of the approvers,
you'll see the same message but it won't be a link. If you are an approver and you
click the link, you'll go to the Pipeline Designer graph. Hover over the approval
item to see its status, then right-click and select the Approve/Reject
Details option. If you approved it, the Pipeline approve
submitted
message is displayed. Once the required number of approvers
have submitted an approval, the pipeline starts back up and continues running, the
approval node turns green (signifying completion), and the pipeline continues by
executing the next downstream task.
- They can see the pipeline's flow from the Pipeline Run page before approving or rejecting it.
- The Pipeline Queue tab shows pipelines runs that are either running or are waiting for some action, such as an approval. If a pipeline is in the waiting state, an approval (or multiple ones) is needed.
- From the Pipeline Queue page, you can sort by the Progress column, to see all the pipelines "Waiting for approval".
- The notification email's subject line may show, for example, "Pipeline run 4 for pipeline ManualApproval07 requires approval to proceed". If you click the "4" link in the email, you'll be taken to the page where you can right-click the Approval node and select the Approve/Reject Details context menu item.