Azure管道在前一个管道完成后不会触发。

huangapple go评论54阅读模式
英文:

Azure pipeline doesn't triggers after completion of previous pipeline

问题

In Azure DevOps,在Azure DevOps中,我有2个流水线,我们称之为流水线A和流水线B。 Pipeline A is scheduled to run daily. Pipeline A被安排每天运行。Upon successful completion of Pipeline A, I want to trigger Pipeline B.成功完成Pipeline A后,我想触发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?我已经添加了应该在Pipeline A成功完成后触发Pipeline B的代码片段。但它不起作用。我该如何修复这个问题?

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
trigger: none

resources:
  pipelines:
  - pipeline: AliasA
    source: Pipeline A  # 触发此流水线的流水线名称
    trigger: 
      branches:
      - branch_prod  # 会触发此流水线的分支

以上是您提供的代码部分的翻译。

英文:

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

答案1

得分: 1

试一下:

资源:
  管道:
  - 管道: 别名A # 管道资源的名称。
    源: 管道A # 此管道资源引用的管道的名称。
    项目: 项目 # 仅在源管道位于另一个项目中时需要
    触发器: true # 当yyy的任何运行完成时运行xx管道
英文:

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

huangapple
  • 本文由 发表于 2023年6月9日 02:58:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76434934.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定