首页 > 解决方案 > Azure 管道 Yaml 管道

问题描述

我有两个不同的 yaml 管道,一个用于生产,一个用于开发。开发:

trigger:
  batch: True
  branches:
    include:
      - Development
  paths:
    include: 
    - Azure/Payload/Development/Payload.json

生产:

trigger:
  batch: True
  paths:
    include: 
    - Azure/Payload/Prod/Payload.json

当我提交开发分支文件时,Prod 和 dev 和管道都在执行。但它正在成功执行,另一方面,如果我触发 prod,则仅触发 prod 管道。我不确定为什么以及如何发生这种情况。

标签: azure-devops

解决方案


好吧,在第二个中,您缺少第一个分支过滤器

 branches:
    include:
      - Development

因此,如果您的分支是,Production请添加分支过滤器:

 branches:
    include:
      - Production

推荐阅读