TeamCity best practice building release and patch versions

I have recently moved to TeamCity from CruiseControl.NET and wondered how other people are using TeamCity to build their software.

We need to build the software in development and release modes. In development mode we build the software and run various unit tests. In release mode we do this too but additionally create an installer. Our development and release codebases are in different repos (in TFS speak they are in trunk and release branches). A checkin from the trunk branch triggers a full build and unit tests. A checkin form the release branch triggers the same but additionally creates an installer.

We also sometimes need to patch our software.

What I'd like to know is:

  • How do other people setup TeamCity to build their software for development and release? How do you version these builds?
  • How do other people use TeamCity to create patches? How do you version these patches?

I want to hear as many suggestions as possible to give us an idea of what's possible.

Comment actions Permalink

Usual approach is to have a project per each branch. You can also create an umbrella project for all branches and trunk, this will give you ability to share common settings between branches - VCS roots, templates, parameters, etc.
So in TeamCity the process looks like this: you create a project for trunk, configure all necessary build configurations there, etc, etc. Then when you want to branch your code you copy this project and reconfigure copy to branch - change VCS roots there, remove unnecessary configurations, add missing ones, maybe change build numbers. The project for trunk remains intouch.

Since TeamCity supports parameters in VCS roots you can have single parametrized VCS root for trunk and branches and move it to the parent - umbrella project. Then after copy of the project for the next branch all you need to do is to change parameter with branch name in the copy of the project.

Hope this will give you ideas how to organize your projects in TeamCity.

Comment actions Permalink

Thanks for the reply, much appreciated and very useful.


Please sign in to leave a comment.