0
votes

I have a problem with multi stage pipelines. Let's say I have pipeline A and pipeline B.

Pipeline A is as follows :

  • Stage A.1
  • Stage A.2

Pipeline B is as follows :

  • Stage B.1
  • Stage B.2

Those pipelines work on different triggers placed on different repositories.

Sometimes we have the following behavior :

  • Pipeline A starts stage A.1
  • Then, before Pipeline A can begin stage A.2, Pipeline B ls launched because of its trigger and starts stage B.1 (please note that pipeline A and B are totally independent one from another)
  • Only after B.1 has finished, Pipeline A can continue on A.2

I don't complain about the sequential behavior, I don't want parallel runs. But I would like to tell to Azure DevOps to finish a pipeline before it starts another.

To summarize it all, can you tell Azure DevOps to finish a multi stage pipeline before it starts another pipeline ? And I'm not talking about another instance of the same pipeline, I am talking about a completely different pipeline.

1

1 Answers

0
votes

This seems like a use case for exclusive locks. You could make an environment (environment A and environment B) in Azure pipelines for each of the pipelines and then apply an exclusive lock policy on these two environments. So you apply the same lock to both of the environments, not two separate locks.

For more information:

https://docs.microsoft.com/en-us/azure/devops/release-notes/2020/pipelines/sprint-172-update#exclusive-deployment-lock-policy

https://docs.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass#exclusive-lock