TeamCity command line remote run tool allows you to start Personal Builds from the command line.
TeamCity Command Line Remote Run tool allows running Personal Builds from the command line (Windows, Linux, Mac are supported, provided a JRE is installed).
The tool has no integration with a version control. It starts a personal build for the supplied list of files, and uses a special mapping file to match local files on the developer machine with build agent checkout directory.
The server supports running personal builds for the sources stored under Subversion, CVS, Perforce and Git.
See plugin page in marketplace
First, make sure Java JRE 1.8.+ is installed on your machine.
After installing the plugin,
navigate to My Profile | TeamCity Tools side panel | Command Line Remote Run
and click download to save the tcc.jar
file to your file system.
The tool is run with the java -jar <path to tcc.jar> <command> <options>
command.
The list of available commands is available upon java -jar <path to tcc.jar> help
To see description for a specific command, run java -jar <path to tcc.jar> help <command>
To work correctly, the tool requires a mapping from local directory paths to VCS settings in TeamCity.
This mapping should be stored to .teamcity-mappings.properties
configuration file. See below on how to create this file.
java -jar <path to tcc.jar> login --host <server URL> --user <username>
You will be prompted to enter the password. The "login" command persists credentials for the target host to avoid
authorization options for subsequent starts. The last logged in <server URL>
is treated as the default one and
will be used if the --host
key is omitted. You will need to specify the server URL for the run
command only.
To run a remote build, the tool also requires:
buildTypeID
is displayed in the drop-down list
of available build configurations on the configuration web UI page of the Command Line Remote Run tool, or it can be taken from the URL
on the build configuration page..teamcity-mapping.properties
file (see below)Collect the required information and run a remote build on the specified list of files for the selected build configuration:
java -jar <path to tcc.jar> run --host <server URL> -m "<build comment>" -c <buildTypeID> <list of modified files>
By default, the "run" command will wait for the build to finish and returns the code corresponding to the status of the build.
This exit code can be used to perform a commit. See java -jar <path to tcc.jar> help run
for more options.
.teamcity-mapping.properties
fileThe plugin provides a web UI configuration page which helps to create the .teamcity-mapping.properties
file.
When done, copy the resulting content to .teamcity-mappings.properties
file to any of the following directories:
$HOME/.TeamCity-CommandLine
default directory