The Finish build trigger triggers a build of the current build configuration when a build of the selected build configuration is finished. If the Trigger after successful build only checkbox is enabled, a build is triggered only after a successful build of the selected configuration.
To monitor builds in other build configurations and trigger a build if these builds change, please see this option of the Schedule build trigger.
tip
In most of the cases the Finish Build Trigger should be used with snapshot dependencies, i.e. the current build configuration where the trigger is defined should have a direct or an indirect snapshot dependency on the build configuration selected in the trigger. If there is no snapshot dependency, the following limitations exist:
it is likely that a build of the build configuration being triggered will not have the same revisions as the finished build even if both configurations have the same VCS settings
if a build configuration with the Finish Build Trigger has an artifact dependency on the last finished build of the build configuration specified in the trigger settings, there is no guarantee that artifacts of a build which caused build triggering will be used, because, while the triggered build sits in the build queue, another build may finish
the build triggered by the Finish Build Trigger will always be triggered in the default branch even if the finished build has some other branch
All these limitations do not apply if a build configuration with "Finish build trigger" has a snapshot dependency on the selected build configuration. In this case, the trigger will run build on the same revisions and will attach the build to the chain. It will also use consistent artifacts if they are produced by dependencies.
In a build configuration with branches, use the filter described below to limit the branches where finished builds will trigger new builds of the current configuration.
Branch FilterbranchFilter
When a VCS Root has branches configured, the Branch filter setting appears in the trigger options.
The Branch filter setting limits a set of logical branch names (the branch names as they appear in the TeamCity UI) which trigger should apply to. The branch filter uses format and precedence similar to the branch specification (but it matches logical branch name and uses no parenthesis).
Details of the format:
+:logical branch name
-:logical branch name
where logical branch name is the part of the branch name matched by the branch specification (i.e. displayed for a build in TeamCity UI), see Working With Feature Branches.
It is possible to use the wildcard placeholder ('*') which matches one or more characters:+|-:name*will match the branch 'name1' but will not match the branch 'name', which will need to be added explicitly.
Other examples:
Only the default branch is accepted:
+:<default>
All branches except the default one are accepted:
+:*
-:<default>
Only branches with the feature- prefix are accepted:
+:feature-*
By default, the branch filter is set to accept only the default branch (+:<default>), which is also the equivalent of the empty branch filter.
If several rules match a single branch, the most specific (least characters matched by pattern) last rule apply.