Configuring VCS Triggers
VCS Build Triggers automatically start a new build each time TeamCity detects that updates have been checked into the Version Control System. When this option is enabled, TeamCity periodically (according to root's Changes Checking Interval) polls VCS roots of the build configuration for changes and triggers a build (puts it into the build queue) when matching changes are found.
Quiet Period Mode
If Quiet period mode is set for the trigger, the build will be triggered only after the specified time elapses between the commits. This can be used to ensure a build is not triggered in the middle of non-atomic checkins consisting of several VCS checkins.
Using Wildcards And Operators In VCS Triggers Rules
TeamCity offers a range of wildcards and operators to exclude parts of the VCS roots or changes performed by specific users from a VCS trigger. These rules are entered in Build trigger rules text box.
The general syntax for a single rule is as follows:
+|-:[user=VCS_username;][root=VCSRootName]:[wildcard]
Only "*" and "**" patterns are supported in the Wildcards, "?" pattern is not supported. [wildcard]
can also be "." (dot) - this means "all the content" and is the same as "**". When entering rules please note the following:
To enter multiple rules, each rule should be entered on a single line separated by a line feed character.
The most specific rules are applied first, regardless of the order that the rules are listed in.
As soon as you enter any "+" rule, TeamCity will remove the default include all setting. To include all the files, use "+:." rule.
If you don't enter an operator, it will default to "+".
An example with three build triggering rules:
-:/src/help -:**.html -:user=techwriter;root=Internal SVN:/doc/*.xml -:lib/**
In the above example,
the rule "
-:/src/help
" excludes a build being triggered when updated files are checked into thesrc/help
path of the VCS root.the rule "
-:**.html
" excludes all.html
files from trigger a build.the rule "
-:user=techwriter;root=Internal SVN:/doc/*.xml
" excludes builds being triggered by.xml
files checked in by user "techwriter" to thedoc
path of the VCS root named Internal SVN (as defined in the VCS Settings).the rule "
-:lib/**
" prevents the build from triggering by updates to the "lib" directory of the agent. All files placed into the directory (by processing VCS root checkout rules) will not cause a build to be triggered.