创建分支时禁用管道触发器

发布于 2025-02-04 15:59:06 字数 447 浏览 5 评论 0原文

我在单个YAML管道中有多个回购触发器,对于一个存储库,我想在为测试存储库创建新的分支时要禁用触发器。我只尝试包括路径,但没有帮助。

repositories:
    - repository: BBB
      type: git
      name: ABC/tools
      ref: master
      trigger:
        branches:
          include:
            - testbranch/*
    - repository: AAA
      type: git
      name: ABC/test
      ref: master
      trigger:
        paths:
          include: 
            - origin/testbranch/*

上述嗅探的任何建议

I am having multiple repo triggers in single YAML pipeline and for one repository I want to disable trigger when new branch created for test repository. I tried only including the path but didn't help.

repositories:
    - repository: BBB
      type: git
      name: ABC/tools
      ref: master
      trigger:
        branches:
          include:
            - testbranch/*
    - repository: AAA
      type: git
      name: ABC/test
      ref: master
      trigger:
        paths:
          include: 
            - origin/testbranch/*

Any suggestion to above sniffet

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇纵 2025-02-11 15:59:06

您可以为此触发添加“排除”。当在此“ TestBranch”文件夹中创建新的分支时,将触发管道。如果您不希望触发管道,请使用“旧”前缀创建新的分支。

repositories:
    - repository: BBB
      type: git
      name: ABC/tools
      ref: master
      trigger:
        branches:
          include:
            - testbranch/*
    - repository: AAA
      type: git
      name: ABC/test
      ref: master
      trigger:
        paths:
          include: 
            - origin/testbranch/*
          exclude: 
            - origin/testbranch/old***

you could add "exclude" for this trigger. When new branches are created in this "testbranch" folder, the pipeline will be triggered. If you don't want the pipeline to be triggered, create the new branches with "old" prefix.

repositories:
    - repository: BBB
      type: git
      name: ABC/tools
      ref: master
      trigger:
        branches:
          include:
            - testbranch/*
    - repository: AAA
      type: git
      name: ABC/test
      ref: master
      trigger:
        paths:
          include: 
            - origin/testbranch/*
          exclude: 
            - origin/testbranch/old***

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文