TeamCity 6.0 Help

Branch Remote Run Trigger

Since TeamCity 6.5 To run a personal build for Git or Mercurial you need to add "Branch Remote Run" trigger to a build configuration.

Branch Remote Run trigger automatically starts a new personal build each time TeamCity detects new changes in particular branches of the VCS roots of the build configuration. At the moment this trigger supports only Git and Mercurial. A trigger monitors branches with names that match specific patterns:

for Git repositories — refs/remote-run/{teamcity.username}/{branch name} for Mercurial repositories — remote-run/{teamcity.username}/{branch name}.

You can start a personal build in a build configuration with the trigger enabled by simply pushing your changes into a branch with the described name in the repository that TeamCity monitors. Use your TeamCity username instead of {teamcity.username} and use any branch name instead of {branch name}.

Example: Run a personal build from a command line.

Git

% cd <your local git repo> % git branch * master % git checkout -b my_feature Switched to a new branch 'my_feature' //code, commit; code, commit % git push origin +my_feature:refs/remote-run/<your teamcity username>/my_feature

Mercurial

% cd <your local hg repo> % hg branch default % hg branch remote-run/<your teamcity username>/my_feature marked working directory as branch remote-run/<your teamcity username>/my_feature //code, commit; code, commit % hg push -b remote-run/<your teamcity username>/my_feature --new-branch
Last modified: 20 April 2023