I have a dev, uat, and prod environment for my ado project, and I just completed a pipeline deploy to dev.

Is it better practice to have a second pipeline that triggers on the uat branch, or is another stage in the same pipeline a better approach?

I'm leaning towards having a single pipeline, but am unsure how to set up a PR with a manual approval for uat.

Is this even an approach I should be investigating?

2 Answers 2


maybe you can go in to a bit more details on the branching strategy you follow for example git flow as that will impact how you setup your CI/CD Pipelines.

For us we have one Pipeline for CD that will build the Development Branch (Git Flow) to deploy to our UAT Environment but automatically skip the Prod environment stage if the branch is called Develop* or Feature*

If the Branch starts with Release/* it will go throe the build stage, the UAT Deployment stage, The Automated Testing stage (Against UAT) and then the Production Stage, see below graphic to illustrate.

What I like on this approach is that you use the exact same code package (artifacts) on UAT and Prod, in your case that would be Dev, UAT and Prod.

enter image description here

In our case the CI Pipeline is a separate Pipeline and uses the same yaml templates for the build but only deploys to the Automated Test environment and is triggered by a Pull Request Policy


It depends on your specific requirements and constraints, but having a single pipeline that handles multiple environments can simplify the overall CI/CD process and make it easier to track changes and deployments across different environments.

If you want to use a single pipeline, you can add a stage for UAT that is triggered only when a pull request is made to the UAT branch, and requires manual approval before proceeding to the next stage. To set this up, you can use the following steps:

  1. Create a separate stage for UAT in your pipeline and configure it to run only when a pull request is made to the UAT branch.

  2. Add a manual approval step in the UAT stage, so that someone must approve the deployment to UAT before it proceeds.

  3. Use a feature such as approval rules in your version control system, such as GitHub, to ensure that only approved changes can be merged into the UAT branch.

  4. Add a stage to your pipeline that handles the production deployment, and ensure that it only runs after the UAT stage has been approved and completed.

This approach can provide a more controlled and auditable deployment process, as well as give you the ability to test changes in the UAT environment before deploying to production. However, if your requirements are different, you may need to use a different approach that better suits your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.