Search code examples
azureazure-devopstriggersazure-pipelinesazure-triggers

Azure pipeline doesn't triggers after completion of previous pipeline


In Azure DevOps I have 2 pipelines let's say Pipeline A and Pipeline B. Pipeline A is scheduled to run daily. Upon successful completion of Pipeline A I want to trigger Pipeline B.

I've added the snippet that should trigger Pipeline B upon successful completion of Pipeline A. But it doesn't work. How can I fix that?

trigger: none

resources:
  pipelines:
  - pipeline: AliasA
    source: Pipeline A  # Name of the pipeline that triggers this pipeline
    trigger: 
      branches:
      - branch_prod  # Branches that will trigger this pipeline

Solution

  • Try this:

    resources:
      pipelines:
      - pipeline: AliasA # Name of the pipeline resource.
        source: PipelineA # The name of the pipeline referenced by this pipeline resource.
        project: Project # Required only if the source pipeline is in another project
        trigger: true # Run xx pipeline when any run of yyy completes