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.
TeamCity allows synchronizing project settings with the version control repository (VCS). Supported VCSs are Git, Mercurial, Perforce, Subversion, and Azure DevOps Server (formerly TFS).
Last modified: 15 November 2022. This section contains articles on how to create and configure build configurations via the TeamCity UI. A build configuration is a collection of settings used to start a build and group the sequence of the builds in the UI.
An ID is an identifier given to TeamCity entities (projects, build configurations, templates, VCS roots, and so on). Each entity has two identifiers: external ID. Universally Unique ID, or UUID.
In TeamCity 2022.10, you can use new REST API requests to check the status of your nodes in the high availability setup and reassign node responsibilities.
This isn't an answer, but...
We asked JetBrains for their recommendation on this and got the following response:
So far there is no functionality to store configuration settings in the version control. The settings are stored in XML on the disk (in TeamCity data directory - http://confluence.jetbrains.net/display/TCD7/TeamCity+Data+Directory) and in theory it is possible to synchronize the directory with a version control. You might want to vote for the feature or watch it in our issue tracker: http://youtrack.jetbrains.com/issue/TW-2806
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
This has been introduced in TeamCity 9:
https://confluence.jetbrains.com/display/TCD9/Storing+Project+Settings+in+Version+Control
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With