[英]How to Trigger a build pipeline depends on create PR request source branch in Azure DevOps
I have a Develop branch and Master.我有一个开发分支和大师。 My task is to trigger the build pipeline when I create a Pull Request from Develop to Master before merge, depends on Develop branch.
我的任务是在合并之前创建从 Develop 到 Master 的 Pull Request 时触发构建管道,这取决于 Develop 分支。 The trigger should be from source branch.
触发器应该来自源分支。 Can we add tags to trigger the build pipeline based on source branch.
我们可以添加标签来触发基于源分支的构建管道吗? I am using classic pipelines and new to ADO.
我正在使用经典管道和 ADO 的新手。 how can I achieve this.
我怎样才能做到这一点。 Please someone help me to achieve this in detail.
请有人帮我详细实现这一目标。
To get a pipeline to trigger when a PR is opened but before it is merged you would need to add a branch policy on master branch to have a build validation step.要在 PR 打开但在合并之前触发管道,您需要在主分支上添加分支策略以进行构建验证步骤。 This will trigger the pipeline to run whenever a PR is opened to master
每当 PR 向 master 开放时,这将触发管道运行
Unfortunately, PR trigger behaviour varies, depending on which SCM you're using: Azure Repos Git, GitHub, or Bitbucket Cloud.不幸的是,PR 触发行为会有所不同,具体取决于您使用的 SCM:Azure Repos Git、GitHub 或 Cloud。 With BB Cloud, the PR build will be triggered when the PR is opened or updated, but not when it is merged.
使用 BB Cloud,PR 构建将在 PR 打开或更新时触发,但在合并时不会触发。 The filter input can be used to specify branches for PR trigger.
过滤器输入可用于指定 PR 触发的分支。
Details for each SCM system can be found by clicking on the links on the " Triggers in Azure Pipelines " documentation.通过单击“ Azure 管道中的触发器”文档中的链接,可以找到每个 SCM 系统的详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.