Prevent CI Build on all other branches except few

Rohit Wagh's Avatar

Rohit Wagh

19 Apr, 2023 10:41 AM

Hi,

Is there any configuration available in Appveyor YAML, where i can set that only commits (any commit) in develop and master branch should trigger CI and any commits in any other branch should not trigger CI.

I tried setting following, but it still triggers the CI, consuming some time of the job before it exits.

-
  branches:
    except:
      - develop
      - master
  
  init:
  - cmd: appveyor exit
  1. Support Staff 1 Posted by Feodor Fitsner on 19 Apr, 2023 10:42 PM

    Feodor Fitsner's Avatar

    Hi Rohit,

    I don't see your entire appveyor.yml but I guess you are trying to "diverse" and "filter" build jobs depending on branch? If so, I'm afraid it won't work: current implementation is either "specify" or "filter". The way you do it right now with appveyor exit is probably the right thing.

  2. Feodor Fitsner closed this discussion on 20 Jun, 2023 09:04 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac