0
votes

I have C# project in TFS + TeamCity (TC). Now i have tag 1.0, trunk 2.0 and TC build config for 2.0.

I need to enable build for 1.0 from tag (and for future tag 2.0, 3.0, etc..).

I've created common TC project MyProject with all necessary configurations. Now i added subproject '1.0 release brunch'. And i'm goning to copy all configurations from root project + change VCS roots of that configuration. When i'll have to make tag 2.0 i'll create subproject '2.0 release brunch' and copy all root configurations to this subproject and change VCS root.

Is this normal steps to support previous projects? Should i use configuration templates or something? Each project contains 5+ configurations to build CI and Full Release builds with all changes, E2E testing, etc. So this is not just copy configuration to the subproject and change VCS root. This seems will be a tuning for every project. And i'd like to automate this as much as possible.

2

2 Answers

0
votes

One way of handling this situation is to create a single build configuration and use a parameter in the VCS trunk. So instead of using a VCS root of

https://server/svn/MyProject/trunk/

you would instead use

https://server/svn/MyProject/%TagPath%/

Then create a configuration parameter in the TeamCity build configuration called TagPath and simply set it's value to trunk or tags/1.0 or whatever.

The one caveat to be aware of no matter how you do this is that you will have problems if your build process changes in the future and in that case you would probably end up creating separate "old" and "new" build configurations.

0
votes

You can use Build configuration template for this. You can create the template at the root project level and then use it for sub projects.

Look at the "Redefining settings inherited from template" section in the link below on how to use parameters to change the values at the sub-project level.

http://confluence.jetbrains.com/display/TCD8/Build+Configuration+Template