Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 978
Fran Hoey Avatar asked Sep 17 '15 13:09

Fran Hoey


People also ask

What is branch filter in Teamcity?

Branch filter description. Version Control Settings of a build configuration. Limit the set of branches available for the build configuration. This branch filter is applied before any other branch filter and limits branches shown in the custom build dialog, as well as branches visible to triggers and build features.

How do I manually trigger a build in Teamcity?

To run a custom build with specific changes, open the build results page, go to the Changes tab, expand the required change, click the Run build with this change, and proceed with the options in the Run Custom Build dialog. Use HTTP request or REST API request to TeamCity to trigger a build.


1 Answers

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

VCS trigger branch filter:

+:*  
-:<default>
like image 144
Alina Mishina Avatar answered Sep 19 '22 07:09

Alina Mishina