How to create a pipeline (YAML configuration, not classic) that is able to trigger multiple pipelines, in the same Project, inside Azure DevOps Organization ?
Trigger all the pipelines in the list, at the same time, no matter the result of the build(s) of each one of them, fail or pass.
Thank You.
How to create a pipeline (YAML configuration, not classic) that is able to trigger multiple pipelines, in the same Project, inside Azure DevOps Organization ?
Trigger all the pipelines in the list, at the same time, no matter the result of the build(s) of each one of them, fail or pass.
Thank You.
Share Improve this question asked Jan 29 at 16:56 Pedro CostaPedro Costa 291 silver badge6 bronze badges2 Answers
Reset to default 4To trigger one pipeline after another, configure a pipeline resource trigger.
For example, if pipeline A
should trigger pipelines B
, C
and D
(in the same project) you can define the following trigger (or similar) in each one of them:
# Resource to define in pipelines B, C and D
resources:
pipelines:
- pipeline: source # pipeline alias
source: A # source (aka triggering) pipeline name
trigger: true # trigger a run when any run of A pipeline completes
You can optionally specify branch filters, stage filters and tag filters:
# Resource to define in pipelines B, C and D
resources:
pipelines:
- pipeline: source # pipeline alias
source: A # source (aka triggering) pipeline name
trigger:
branches: # Branches to include and/or exclude
include:
- main
- develop
- features/*
exclude:
- features/experimental/*
tags: # List of tags that when matched will trigger the pipeline.
- release25
stages: # List of stages that when complete will trigger the pipeline.
- build
Please refer to the documentation for more details.
@Rui has the right idea where you configure pipelines with pipeline resources that act as triggers. This approach creates an event-driven model of chaining actions together.
If you need more granular control over which pipelines are executed, you can also use the REST API or the TriggerBuild marketplace task in your pipeline to trigger the other pipelines.