I'm looking to migrate our build infrastructure from CC.NET to TeamCity. Admittedly pretty green with TeamCity at this point.
One potential show-stopper is that we need our build configuration to be version-controlled alongside the source code it builds. CC.NET makes this pretty easy and is a very useful/powerful feature.
From my investigation you can change where TeamCity stores its config/data, but none of the official documentation (nor other topics here on SO) seem to reference placing it in a version-controlled location such as TFS, Perforce or ClearCase.
I therefore wonder if it's possible and/or is it the 'done thing'??
Could it be that if TeamCity assumes R/W access to any config files and the underlying VCS makes files R/O requiring check-in/check-out semantics that this'll confuse TeamCity and stop it working.
Does anyone here have experience of version controlling TeamCity build configuration in Team Foundation Server (or similar)?
Thanks, Jack
FYI - How does one version control the configuration of a TeamCity project? seems to be the only similar thread here on SO. http://confluence.jetbrains.net/display/TCD7/How+To... and related official docs talk about migrating config and/or backing it up, which is close but not really the same thing.
This isn't an answer, but...
We asked JetBrains for their recommendation on this and got the following response:
I can't see any elegant solution, so would think that the best solution (least worst solution...) is to:
Good luck, and if you find a good solution please share it :-D
I've been wanting a way to source control TeamCity config for a long time. I ended up writing a Windows Service which monitors the configuration directory and commits changes to git.
It isn't TFS but the source code is on GitHub so you could easily adapt the solution to fit your needs.
The project is on GitHub: https://github.com/grenade/teamcity-config-monitor
This has been introduced in TeamCity 9:
https://confluence.jetbrains.com/display/TCD9/Storing+Project+Settings+in+Version+Control
As far as I know this isn't supported, but an approach I recommend is to invoke a batch file stored in source control during build. The batch file can manually invoke the commands required to do the build, or could invoke e.g. FinalBuilder. This allows for great flexibility in the build process.