TeamCity 2018.1 Help

Command Line

Using this build runner, you can run any script supported by the OS. In this section:

Command Line Runner Settings

General Settings

Option

Description

Working directory

Specify the Build Working Directory if it differs from the build checkout directory.

Run

Select whether you want to run an executable with parameters or custom shell/batch scripts.

Command executable

The option is available if "Executable with parameters" is selected in the Run dropdown. Specify the executable file of the build runner

Command parameters

The option is available if "Executable with parameters" is selected in the Run dropdown. Specify parameters as a space-separated list.

Format stderr output as: (Since TeamCity 2017.2)

Specify how the error output is handled by the runner:

  • error: any output to stderr is handled as an error

  • warning: default; any output to stderr is handled as a warning

Custom script

A platform-specific script which will be executed as a *.cmd file on Windows or as an executable script in Unix-like environments. The option is available if "Custom script" is selected in the Run dropdown.

TeamCity treats a string surrounded by percentage signs (%) in the script as a parameter reference. To prevent TeamCity from treating the text in the percentage signs as a property reference, use double percentage signs to escape them: e.g. if you want to pass "%\Y%m%\d%H%\M%S" into the build, change it to "%\%Y%\%m%\%d%\%H%\%M%\%S"

Docker Settings

In this section, you can specify a Docker image which will be used to run this build step.

Code Coverage

To learn about configuring code coverage options, refer to the Configuring Java Code Coverage page.

Last modified: 20 April 2023