如何仅在PR上触发合并而不在Azure管道上触发构建? [英] How do I trigger build only on PR, and not after merge, on Azure pipelines?

查看:43
本文介绍了如何仅在PR上触发合并而不在Azure管道上触发构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是针对 pyjanitor 项目提出的问题./p>

我有一些构建管道,这些管道被拆分成多个作业,这些作业被设计为可以并行运行.但是,我注意到,即使在合并PR之后也会触发构建.因此,我的问题有两个方面:

  1. 是否可以触发构建以便仅检查PR?
  2. 仅检查PR还是一种很好的做法,还是在合并(以及运行所有测试)之后构建可能会丢失的理由?

更新:

我认为这个问题应该与

如果要在合并后禁用构建-禁用提交触发器.

yaml:

 触发:无 

This is a question raised for the pyjanitor project.

I have build pipelines that are split into jobs, and the jobs are designed to run in parallel. However, I noticed that the builds are triggered even after merging PRs. Hence, my question is kind of two-fold:

  1. Is it possible to trigger build such that we only check PRs?
  2. Is it even good practice to just check PRs, or is there a rationale for building after merge (and also running all the tests) that I might be missing?

Update:

I believe that this question should be distinct from the suggested duplicate because the question I have is how to disable build after PR is merged, rather than forcing a build before PR is made.

Looking through the suggested duplicate, I did not find anything about how to configure my Pipeline YAML to disable build after PR merge. The suggested "branch policies" thing also does not show up on my Pipelines dashboard.

解决方案

if you want to disable build after merge - disable commit trigger.

yaml:

trigger: none

这篇关于如何仅在PR上触发合并而不在Azure管道上触发构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆