【问题标题】:non-interference pipeline triggers between 2 azure pipelines2 个 azure 管道之间的非干扰管道触发
【发布时间】:2020-06-24 15:20:15
【问题描述】:

我有 2 个管道,分别命名为 a.yml 和 b.yml。它们都在文件夹 cci-project/xyz-lable-service/devOps/

如何创建以下管道触发器

对于管道 a.yml,它将由分支更新触发 except 管道 b.yml

对于管道 b.yml,它只会在 b.yml 文件中有任何更新时触发

【问题讨论】:

    标签: azure-devops azure-pipelines


    【解决方案1】:

    对于管道 a.yml,它将由除管道 b.yml 之外的分支更新触发

    我们可以在a.yml 中使用分支和路径触发器,如下所示:

     trigger:
       branches:
         include:
         - master
         - Dev
        
       paths:
         exclude:
         - b.yml
    

    对于管道 b.yml,只有在有任何更新时才会触发 b.yml 文件

    我们只能设置路径触发器在b.yml中包含b.yml文件:

     trigger:
       paths:
         include:
         - b.yml
    

    您可以查看this document 了解更多详情。

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2022-01-21
      • 2021-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-11
      • 2020-04-13
      • 2022-07-01
      • 1970-01-01
      相关资源
      最近更新 更多