2
votes

I'm looking at using TeamCity 7.1 as our build server, and I am trying to figure out if it is possible to do what I want.

Our TFS branching looks like this

  • MyProject
    • tags
      • 1.0.0.0
      • 1.1.0.0
      • 2.0.0.0
    • trunk

So our process is to work in the trunk, and when we reach a point where we want to deploy, then we create a branch with that code. In the above example, version 2.0.0.0 is in production, and the trunk has further changes made to it. So if I need to fix a bug in production, then I will fix it in the 2.0.0.0 branch.

I am able to set up a build that checks out the trunk, runs tests, etc., without any problems, and it can be triggered by checkins to the trunk. But I would like to also monitor all the version specific branches, so that when I check in a bugfix in the 2.0.0.0 branch, then a build is triggered, and all my tests are run.

It seems that some of the VCS options have had a new feature added to support this called "branch specification" (https://tom.cabanski.com/2012/11/19/teamcity-7-1-branch-builds-rock/) but that is not available on a TFS VCS root.

Is it possible to do this without creating a separate build configuration for each of my version branches? Or is there a way to manually launch a build of a specific branch, by using my existing build configuration for the trunk?

1

1 Answers

0
votes

Since "feature branches" are not supported for TFS in TeamCity (only for Git and Mercurial at this time), creating separate build configurations is the best way to build separate branches. Actually, even for Git and Mercurial creating separate build configurations for long-lived version branches (as opposed to feature branches which come and go) is recommended.

I am not sure how branches are handled in TFS, but if you use tags, I believe there is no way to build off a TFS tag in TeamCity (TW-7370).