TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Storing Project Settings in Version Control

Last modified: 20 November 2020

TeamCity allows the two-way synchronization of the project settings with the version control repository. Supported VCSs are Git, Mercurial, Perforce, Subversion, and Azure DevOps Server (formerly TFS).

You can store settings in the XML format and in the Kotlin language and define settings programmatically using the Kotlin-based DSL.

When you enable two-way settings' synchronization:

  • Each administrative change made to the project settings in the TeamCity web UI is committed to the version control; the changes are made noting the TeamCity user as the committer.

  • If the settings change is committed to the version control, the TeamCity server will detect the modifications and apply them to the project on the fly.
    Before applying the newly checked-in settings, validation constraints are applied. If the constraints are not met (that is, the settings are invalid), the current settings are left intact and an error is shown in the UI. Invalid settings are those that cannot be loaded because of constraints, for instance, a build configuration referencing a non-existing VCS root, of having a duplicate ID or a duplicate name.

The versioned settings are stored in the .teamcity directory in the root of the VCS repository, in the same format as in the TeamCity Data Directory.

Administrator's Guide