Search code examples
gitteamcityteamcity-9.0

How to get TeamCity Build trigger filter to build feature branches but not default branch


I've created a Team City build to build the feature branches:

Default Branch: refs/heads/development Branch Specification: refs/heads/feature/*

I have a vcs trigger so it builds for every git push. But I don't want it to build when someone pushes to the development branch.

I have tried playing with the branch filter in the trigger, but either features and development build on push, or none of them do.

I'm using TC 9.1.1


Solution

  • Try the following settings:
    Default Branch: refs/heads/development
    Branch Specification: +:refs/heads/feature/*

    VCS trigger branch filter:

    +:*  
    -:<default>