|
Documentation Index
|
Configuring VCS SettingsThis section provides notes on configuring the following VCS Settings: Configuring VCS RootsA VCS Root is a description (a number of connection settings) of a version control system where project sources are located. VCS roots are configured on the Version Control Systems page of a build configuration.
Shared VCS RootsBy default, the same VCS root(s) can be used by all of the project's build configurations. They can also be used by different projects when VCS Roots Sharing is enabled on the New or Edit VCS Roots page. Sharing VCS roots saves the administrator's time and the hassle of creating and maintaining identical VCS roots in the repository. If someone attempts to modify a VCS root that is shared, TeamCity will issue a warning that the changes to the VCS root could potentially affect more that one project. The user is then prompted to either save the changes and apply them to all the projects using the VCS root, or to make a copy of the VCS root for use by either a specific build configuration or project. VCS Checkout ModeThe VCS Checkout mode is a configuration that sets how project sources reach an agent. Agents do not need any additional software for automatic checkout modes. TeamCity has three different VCS checkout modes:
VCS Checkout RulesVCS Checkout Rules allow you to exclude paths and/or map paths (copy directories and all their contents) to a different location on the Build Agent during checkout. To add a checkout rule click the edit checkout rules link on the build configuration's Version Control Settings page and a pop-up window will appear where you can enter the rule. The general syntax of a single checkout rule is as follows: +|- : VCSPath [=> AgentPath] When entering rules please note the following:
Rules can be used to perform the following operations:
An example with three VCS checkout rules: -:src/help +:src=>production/sources +:src/samples=>./samples In the above example, the first rule excludes the src/help directory and its contents from checkout. The third rule is more specific than the second rule and maps the scr/samples path to the samples path in the Build Agent's default work directory. The second rule maps the contents of the scr path to the production/sources on the build agent, except src/help which was excluded by the first rule and scr/samples which was mapped to a different location by the third rule.
VCS Labeling SupportTeamCity can optionally add a label into the version control system for the sources used for a particular build. This is useful if you need to collect all of the sources for a specific build in order to recreate it. You can choose to apply the VCS label for all builds or only for successful ones. You can also manually invoke VCS labeling action for a finished build: Check "Label this build sources" in the "VCS revisions and labels" section of the Changes tab of the build results. The labeling process takes place after the build finish and doesn't affect the build status. If the label fails it will not change the build's status. VCS labeling is supported for ClearCase, CVS, Perforce, StarTeam and Subversion.
SubversionSubversion VCS roots need additional configuration for VCS labeling to work. The labeling rules need to be specified to define the SVN repository structure. Labeling rules are specified as newline-delimited rules each of uses the following format: TrunkOrBranchRepositoryPath => tagDirectoryRepositoryPath The repository paths can be relative and absolute (starting from "/"). Absolute paths are resolved from the SVN repository root, relative paths are resolved from the VCS root. When creating a label, the sources residing under TrunkOrBranchRepositoryPath will be put into the tagDirectoryRepositoryPath/<tagName> directory, where <tagName> is the name of the label as defined by the labeling pattern of the build configuration. For example, there is a VCS root with the URL svn://address/root/project where svn://address/root is the repository root, and the repository has the structure: -project --trunk --branch1 --branch2 --tags In this case the labeling rules should be: project/trunk=>project/tags project/branch1=>project/tags project/branch2=>project/tags See also:
|