VCS Checkout Rules

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 4.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Search

Searching TeamCity 4.x Documentation

Table of Contents


VCS 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:

When entering rules please note the following:

  • To enter multiple rules, each rule should be entered on a separate line.
  • For each file the most specific rule will apply if the file is included, regardless of what order the rules are listed in.
  • If you don't enter an operator it will default to +:

Rules can be used to perform the following operations:

Syntax Explanation
+:.=>Path Checks out the root into Path directory
-:PathName Excludes PathName (note: the path must be a directory and not a filename)
+:VCSPath=>. Maps the VCSPath from the VCS to the Build Agent's default work directory
VCSPath=>NewAgentPath Maps the VCSPath from the VCS to the NewAgentPath directory on the Build Agent
+:VCSPath Maps the VCSPath from the VCS to the same-named directory (VCSPath) on the Build Agent

An example with three VCS checkout rules:

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.

Exclude checkout rules will only speed up server-side checkouts. Agent-side checkouts emulate the exclude checkout rules by checking out all the root directories mentioned as include rules and deleting the excluded directories. So, exclude checkout rules should generally be avoided for the agent-side checkout.




See Also:

Labels:

vcs vcs Delete
checkout checkout Delete
rule rule Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.