最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论