[英]GitHub pull requests triggering all pipelines in Azure DevOps
I have 3 pipelines in Azure DevOps, on for each branch, and the code is on GitHub.对于每个分支,我在 Azure DevOps 中有 3 条管道,代码在 GitHub 上。
Whenever I do any Pull Request all my 3 pipelines get triggered.每当我执行任何拉取请求时,我的所有 3 个管道都会被触发。 How can I avoid that?我怎样才能避免这种情况?
The message says "PR automated for"消息说“PR 自动化”
My 3 pipelines are using separated branches:我的 3 个管道正在使用单独的分支:
develop pipeline开发管道
trigger:
branches:
include: [develop]
paths:
include:
- backend/*
staging pipeline暂存管道
trigger:
branches:
include: [staging]
paths:
include:
- backend/*
production pipeline生产流水线
trigger:
branches:
include: [master]
paths:
include:
- backend/*
I found in the docs PR trigger how to disable the run for all PRs adding:我在文档PR 触发器中找到了如何禁用所有 PR 添加的运行:
pr: none
It goes in the root like this:它像这样进入根目录:
trigger:
branches:
include: [develop]
paths:
include:
- backend/*
pr: none
Also:还:
Important重要的
YAML PR triggers are supported only in GitHub and Bitbucket Cloud. YAML PR 触发器仅在 GitHub 和 Bitbucket 云中受支持。 If you use Azure Repos Git, you can configure a branch policy for build validation to trigger your build pipeline for validation.如果您使用 Azure Repos Git,您可以配置一个分支策略进行构建验证,以触发您的构建管道进行验证。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.