TeamCity On-Premises 2024.12 Help

VCS Root

A VCS root in TeamCity defines a connection to a version control system. It represents a set of parameters (paths to sources, username, password, and other settings) that determine how TeamCity communicates with a VCS to monitor changes and get sources for a build.

VCS roots are created in a project and are available to all the build configurations defined in that project or its subprojects. One or more VCS roots can be attached to a build configuration or a template. You can specify portions of the repository to check out and target paths via VCS checkout rules.

To view and manage all VCS roots configured within a project, go to Project Settings | VCS Roots.

Here, you can filter the project's roots by name and modify other filter options.

If someone attempts to modify a VCS root that is used in more than one project or build configuration, TeamCity will issue a warning that the changes to the VCS root could potentially affect other projects or build configurations. The user is then prompted to either save the changes and apply them to all the affected projects and build configurations, or to make a copy of the VCS root to be used by a specific build configuration or project.

On an attempt to create a new VCS root, TeamCity checks whether there are other VCS roots accessible in this project with similar settings. If such VCS roots exist, TeamCity suggests using them.

Once a VCS root is configured, TeamCity regularly queries the version control system for new changes and displays the changes in the build configurations that have the root attached. You can set up your build configuration to trigger a new build each time TeamCity detects changes in any of the build configuration's VCS roots, which suits most cases. When a build starts, TeamCity gets the changed files from the version control and applies the changes to the Build Checkout Directory.

Last modified: 18 September 2024