DEV Community

Cover image for The NEW Manual Validation Task for Azure DevOps YAML Pipelines Demystified
Davide 'CoderDave' Benvegnù
Davide 'CoderDave' Benvegnù

Posted on

The NEW Manual Validation Task for Azure DevOps YAML Pipelines Demystified

With the newly released Manual Validation task you can pause a YAML pipeline mid-stage. This allows you to perform manual or offline activities and then resume (or reject) the run.

Intro

As I've mentioned, you can use this new task in a YAML pipeline to pause a run within a stage, typically to perform some manual actions or validations, and then resume/reject the run.

This is especially useful in scenarios where you want to pause a pipeline and validate configuration settings, build package, etc. before moving on to a long-running, compute-intensive job.

When the Manual validation task is activated during a pipeline, it displays a message bar containing a link that opens the Manual validation dialog containing the instructions. After carrying out the manual steps, the administrator or user can choose to resume the run or reject it.

Demo

Let's see this in action. We will cover how to configure Azure Pipelines to use it and how to use it.

Here you have the video with the whole demo and explanation.

Link to the video: https://youtu.be/sfb3d100JPo

Limitations

Remember that, as I've mentioned in the video, you can use this new approach only in an agentless job of a YAML pipeline. If like in my example you have other jobs already, you would need to add a job with pool: server to make this work.

Conclusions

I wanna know what you think about this feature, so let me know in the comment section below.

Also, check this video over here, where I talk about the differences between Classic and YAML pipelines for both Build and Release.

Like, share and follow me 🚀 for more content:

📽 YouTube
Buy me a coffee
💖 Patreon
🌐 CoderDave.io Website
👕 Merch
👦🏻 Facebook page
🐱‍💻 GitHub
👲🏻 Twitter
👴🏻 LinkedIn
🔉 Podcast

Buy Me A Coffee

Top comments (10)

Collapse
 
eprokofev profile image
Evgenii Prokofev

Hi. Can you help me? I mixed up a bit. What is the difference between the manual validation step and the manual intervention step?

Collapse
 
n3wt0n profile image
Davide 'CoderDave' Benvegnù

Hey sorry, somehow I;ve missed your comment.

The "Manual Intervention" task works ONLY with the Classic Pipelines, while the "Manual Validation" task works ONLY with the YAML Pipelines :)

https://www.youtube.com/watch?v=sfb3d100JPo&t=99s

Collapse
 
eprokofev profile image
Evgenii Prokofev

Hi. Thanks for the reply. Now it makes sense.

Collapse
 
seangwright profile image
Sean G. Wright

Where do you see this manual validation being used when compared to required approvals for environments?

I have yml pipelines setup to move an app through multiple environments of App Services via deployment stages. Each stage after the 'development' environment requires an approval for the DevOps 'Environment' and these approvals can be scoped to specific DevOps users or roles.

The manual validation task is much simpler... 🤔 I'm not sure if I'd use it?

Collapse
 
n3wt0n profile image
Davide 'CoderDave' Benvegnù

Hey, thanks for the question. In YAML the approvals are pre-deployment, this could be used as a workaround to have post-deployment approvals for example. You deploy, and then you pause the stage with a manual validation task so someone can verify that it works, for example.

Or can be something completely unrelated to deployment. Let’s say you are building an application and as part of the process you have to perform a manual action to a 3rd party system that doesn’t have an API you can use for integration…

This task is designed for all the cases like this in which you don’t want or can’t have an automation taking care of “something”.

And I agree with you, it is much simpler than the deployment approvals, at least in its current form, but at least we have something now 😁

Collapse
 
seangwright profile image
Sean G. Wright

I like your example of post-deployment approvals. I had thought about something like this but didn't know how to implement them. I have been using the Environment approval of each stage as a kind of post-deployment approval of the previous stage.

Lots to brainstorm about here 🤔.

Thanks!

Collapse
 
koseavase profile image
koseavase

How to make sure only the notified users should be able to click the Resume button and for other users the button should be disabled.
I found out that any user other than the notified users are able to click the resume button

Collapse
 
n3wt0n profile image
Davide 'CoderDave' Benvegnù

Unfortunately that is currently not possible. Anyone with the Pipelines permissions can do that.

Not sure if this will be implemented in the future, I can try to find out for you.

Collapse
 
jikuja profile image
Janne Kujanpää

When should we use Manual Validation task instead of Environment Approval?

Collapse
 
n3wt0n profile image
Davide 'CoderDave' Benvegnù

Hey, thanks for the question. In YAML the environment approvals are pre-deployment, this could be used as a workaround to have post-deployment approvals for example. You deploy, and then you pause the stage with a manual validation task so someone can verify that it works, for example.

Or can be something completely unrelated to deployment. Let’s say you are building an application and as part of the process you have to perform a manual action to a 3rd party system that doesn’t have an API you can use for integration…

This task is designed for all the cases like this in which you don’t want or can’t rely on the environment approvals