I have multiple Azure YAML multi-stage Pipelines consisting 3-4 stages each.
We use Microsoft Hosted Agents for all.
Currently, when Pipeline A is triggered, it starts executing Stage 1 of the pipeline. Meanwhile, if Pipeline B, Pipeline C.. are triggered, then after execution of Pipeline A - Stage 1 is completed, it skips to Pipeline B - Stage 1 execution and then either comes back to Pipeline A - Stage 2 or goes to Pipeline C - Stage 1 based on the queue order.
How do I avoid this situation? I want Pipeline A when triggered to complete it's all stages and then switch to other pipelines and follow the same approach for rest.
I want to avoid these jumps between stages of multiple pipelines in queue.
For multiple individual pipelines, it's NOT supported to restrict stages in one pipeline starting after stages in another pipeline complete.
Microsoft-hosted agents are assigned to run pipeline jobs based on the availability and compatibility of the agents. When multiple pipelines are triggered, they are added to a queue and processed in the order they were received. When job in pipeline A complete, job in pipeline B or C could start due to the order received.
Even for same pipeline which has multiple stages, they won't wait and jump as well. You can find more details in official doc here:
If you would like the feature, you can raise a use voice ticket here: https://developercommunity.visualstudio.com/AzureDevOps/suggest.