loading...
Cover image for What is the difference? Azure Pipelines PRE and POST Deployment Approvals

What is the difference? Azure Pipelines PRE and POST Deployment Approvals

n3wt0n profile image Davide Benvegnù ・2 min read

It is very common to ask for approval during a release pipeline, especially when deploying to important environments like QA, Production, etc..

Azure Pipelines offers the Approval feature to do so, and it comes in 2 flavors: Pre-deployment and Post-deployment approvals.

But what is the difference between those 2 methods? And why it matters?

Let's discover it together.

Intro

Today we talk about Release flow control using approvals, and more specifically about the different behavior that the Pre-deployment and the Post-deployment approvals have when using Azure Pipelines.

First of all, I should say that this applies to the Classic Release experience only, because with the Multistage YAML Pipelines you can define only some "generic" approvals at environment level and those are de-facto pre-deployment approvals. I made a video about Azure Pipelines Environments where I also cover the approvals for YAML Pipelines, I encourage you to check it out if you are into YAML Pipelines.

Alright, so you are using the Classic Release Pipelines and wanna ask for Approval. Should you use the pre- or the post-deployment approval? What are the differences between those 2?

The Video

To answer these questions and show you how to set and work with those kind of approvals, I created an example and I've gone through that in the video below.

Enjoy the watch!

Conclusion

As you have seen, the behavior between the 2 is pretty different.

What do you think?

Let me know in the comment section below if you prefer using the Pre or the Post deployment approvals and why.

References and Links

Posted on by:

n3wt0n profile

Davide Benvegnù

@n3wt0n

DevOps Architect @ Microsoft. C# coder. Azure expert. MMA fighter. Not in that order.

Discussion

pic
Editor guide
 

Which one do you prefer? Pre or Post approvals?

 

And.. what about if a post-deployment approval its rejected? just change the stage state of deploy to rejected/cancel but not rollback the deployment, im a right?

 

Yes you are right. No action is taken if a stage is rejected. If you want to rollback or to perform any other action, then you'd have to add a specific stage to your pipeline to do so.

Good question!

 

Great! thanks for your answer, and thnks for the good article.

Regards!