Command Line
Using the Command Line build runner, you can run any script supported by the OS.
note
To configure the Command Line build runner in Kotlin DSL, see ScriptBuildStep.
tip
See our video guide on how to run command-line scripts in TeamCity.
Option | Description |
---|---|
Working directory | Specify the working directory where the command is to be run (if it differs from the build checkout directory). |
Run | Specify the mode: run an executable with parameters or run custom shell/batch script (see below). |
Command executable | The option is available if "Executable with parameters" is selected in the Run drop-down menu. Specify the path to an executable to be started. |
Command parameters | The option is available if "Executable with parameters" is selected in the Run drop-down menu. Specify space-separated parameters to pass to the executable. If a parameter contains a space, it can be enclosed in double quotes. For non-trivial parameters it is recommended to use "Custom script" option instead. |
Custom script | The option is available if "Custom script" is selected in the Run drop-down menu. A platform-specific script which will be executed as an executable script in Unix-like environments and as a |
Format stderr output as: | Specify how the error output is handled by the runner:
|
note
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: for example, if you want to pass%Y%m%d%H%M%S
into the build, change it to%%Y%%m%%d%%H%%M%%S
.
In this section, you can specify a Docker image which will be used to run this build step.
To learn about configuring code coverage options, refer to the Configuring Java Code Coverage page.
Thanks for your feedback!