Trigger Multiple pipelines using another pipeline (same Project) - Azure DevOps - Stack Overflow

How to create a pipeline (YAML configuration, not classic) that is able to trigger multiple pipelines,

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 badges
Add a comment  | 

2 Answers 2

Reset to default 4

To 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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745288607a4620718.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信