Triggering an Azure Pipeline build after multiple other pipelines have all completed

Viewed 414

I know you can trigger a pipeline upon completion of another pipeline. eg.

resources:
  pipelines:
    - pipeline: A
      source: A
      trigger:
        branches:
          include:
            - master

But what about if I have multiple pipelines and I want to wait for all of them to complete before triggering. Is that possible?

resources:
  pipelines:
    - pipeline: A
      source: A
      trigger:
        branches:
          include:
            - master
    - pipeline: B
      source: B
      trigger:
        branches:
          include:
            - master

My impression is the above would trigger on either A or B instead of A and B

1 Answers

You are right with your impression. This is not possible to achieve what you want in YAML. A build runs for any of faired trigger. You can try to find workaround by calling external service which actually keeps state of your triggers and under certain condition run another pipeline and in some way it will be similar to gates in release pipeline.

Related