You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure DevOps触发器异常:配置仅dev分支触发却触发master分支

Azure DevOps流水线触发器问题解决

你的配置问题出在branches.exclude: ['*']这一行,Azure DevOps的分支触发规则中,当你明确指定branches.include列表时,默认只会触发列表内的分支,不需要额外排除所有分支。添加exclude: ['*']会导致匹配逻辑冲突,反而让master分支意外触发。

正确的配置如下:

trigger:
  batch: true
  branches:
    include:
    - dev
  paths:
    exclude:
    - azure-pipelines.yml
    - pom.xml

说明:

  • 该配置仅会在dev分支发生代码变更时触发流水线
  • paths.exclude部分保持不变,排除azure-pipelines.yml和pom.xml的变更触发
  • 后续若有新分支需要触发流水线,直接在branches.include列表中添加对应分支名称即可

内容的提问来源于stack exchange,提问作者Kiran Tirumalasetti

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 17:15:36