Manual Validation Task Azure DevOps YAML Pipelines
One of the requested features of YAML DevOps Pipelines has been the ability to add a manual intervention task. One that may pause the pipeline while a manual activity or confirmation of activities occurs. This functionality is now available.
The environment approval functionality currently fires as soon as the deployment job is hit. This works as intended; however, sometimes there is a need to do some manual intervention/review before moving to an environment.
One such scenario is being able to control what releases go to a QA team for approval. By default, using environment approvals every release to a testing environment will go to the QA team for approval. Now with manual intervention tasks we can insert a stop for developer signoff before going to QA. This stop’s intent is to give developers a chance to review their deployments before QA may sign off for a testing environment deployment.
This is just one such scenario where this type of activity could be beneficial.
To set this insert the task for the Manual Intervention:
- task: ManualValidation@0 timeoutInMinutes: 1440 # task times out in 1 day inputs: notifyUsers: | email@example.com firstname.lastname@example.org instructions: 'Please validate the build configuration and resume' onTimeout: 'resume'
Take note of the timeout as the this The end result of this is the banner that was previously available in Classic Releases:
In addition the optional inputs of
notifyUsers will craft and format an email notification like :
When clicking the “Review Manual Validation” button one would be brought to another familiar screen:
This is where the instructions that were inputted above appear on the screen. The approver will have the option to Reject or Resume and be able to add comments.
There it is! This little feature can potentially add a lot of impact to YAML Pipelines and give a more granular control on when a pipeline can be paused and restarted!
If want to read more about how to use YAML Pipelines check out my blog on how to Architecting YAML Pipelines or What to Do When YAML Pipelines Fail
4 thoughts on “Manual Validation Task Azure DevOps YAML Pipelines”
I’ve tried adding this into a new YAML pipeline, and it fails with no errors or explanation given – have you successfully added this in to a stage?
Yes I have. The screenshots that are present were form a YAML deployment pipeline. Are you able to include your error message and/or YAML?
Can you read the value approver inputs as comment for approval / reject ifor further use?
How do you send notify a group using this task ?