0

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
YK1
  • 7,327
  • 1
  • 21
  • 28
Lopez
  • 461
  • 5
  • 19
  • Did you try add an `include:` in the `branches:` collection? See more guidance [here](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops#branch-filters). – YK1 Jun 09 '23 at 00:34

1 Answers1

1

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
Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252
  • This solution is not branch specific. Irrespective of the pipeline completion on any branch the trigger is activated on prod branch, – Lopez Jun 13 '23 at 14:47