Specific Build Configurations for Branches

I am using TC 7.1.5 and we have different build configurations for different branches in our git repo.

For example, the Master Check In Configuration listens for changes in the Master branch and builds the project with the "default" configuration. The Staging Configuration listens for changes in the Staging branch, builds the project with the "staging" configuration and deploys it to our staging server.

To accomplish this, I have had to create seperate VCS Roots for each branch.

I am about to create a new project and before I create multiple VCS Roots where the only difference is the branch name, I noticed the branch sepecification in the VCS Root page. Trying to figure out how to use this I came across this blog entry http://blogs.jetbrains.com/teamcity/2013/03/01/teamcity-feature-branches/ and the documentation of feature branches http://confluence.jetbrains.com/display/TCD7/Working+with+Feature+Branches.

So my question is, can I have a specific build configuration for a specific branch using the branch specifications instead of having to create multiple VCS Roots?

The documentation states

VCS trigger is fully aware of branches and will trigger build once a check-in is detected in a branch. All VCS trigger options like, per-checkin triggering, quiet period, triggering rules are directly available for builds from branches.

But if my project has multiple configuations, which one does it trigger?

2 comments
Comment actions Permalink

Hi Joe

You can have multiple branches (using the specification) on a project, with one configuration, but not multiple configurations in on project.
You might try to standardize the configuration apart from the branch name, and pass it as a parameter to the configuration, which will then have logic that handles it according to the branch name parameter. the branch name that triggers the build (with a specification), is the one where code was pushed.

0

Please sign in to leave a comment.