0
votes

I have a question on Azure DevOps Release pipelines. My pipeline workflow is multi-stage where the build triggers the QA stage which then triggers the UAT stage which then triggers the PROD stage.

I use pipeline variables to manage each stage and require pre-approval on the UAT and PROD stages so that a change does not instantly get deployed to every stage sequentially.

My question is how to handle the case where I have multiple servers in an environment. I see that each environment should be treated as a stage but right now, I am treating each server in an environment as a stage where the tasks are run in parallel. This works for the first stage (QA), but becomes ugly for UAT since each server then requires pre-approval instead of the environment.

I have pipeline variables that specify paths for files to be dropped on servers as well. At a server per stage level, this works but not for multiple servers in a stage.

My pipeline currently looks like the picture below with UAT1 and UAT2 each requiring approval. How do I handle multiple servers for the QA and UAT stages, and later PROD?

enter image description here

1
Hi @Lee Z. Can you explain this point:multiple servers in an environment? Do you mean that multiple agents, multiple targets in deployment group or other servers? Based on my test, when I pre-approval the stage, this could work for the whole stage instead of the server. You could share the error page or steps with us. On the other hand , you can also share with us the ideal state.Kevin Lu-MSFT
Hi @KevinLu-MSFT, my QA environment has 2 servers and my UAT environment has 2 servers. Using task groups, I was able to solve this issue. I will post the answer for others to gain knowledge fromLee Z

1 Answers

1
votes

My issue was that I was using a stage to represent a single server in an environment (i.e. QA, UAT, or PROD) instead of bundling the tasks performed per server into a task group and then use multiple task groups within the stage.

My pipeline now looks like the image below.

enter image description here

Within the stage, there is a task group per server.

enter image description here

The common tasks per server are contained in the task group

enter image description here