简体   繁体   中英

How do I trigger build only on PR, and not after merge, on Azure pipelines?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM