Exec Build Step
A build step running the specified executable with given arguments
Example. Runs an executable in the checkout directory.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
exec {
path = "run.sh"
}
Content copied to clipboard }
}
Example. Runs an executable in the specified build working directory with an argument referencing to the configuration parameter. Any of stderr output will be treated as errors.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
exec {
name = "Execute tests"
workingDir = "tests"
path = "run_tests.sh"
arguments = "%product.version%"
formatStderrAsError = true
}
Content copied to clipboard }
}
Example. Runs an executable in the specified build working directory in the specified Docker container with an argument referencing to the configuration parameter.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
exec {
name = "Execute tests in Docker"
workingDir = "tests"
path = "run_tests.sh"
arguments = "%product.version%"
formatStderrAsError = true
dockerImage = "nodejs:lts"
dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux
dockerRunParameters = "--rm --interactive=false"
}
Content copied to clipboard }
}
See also
Properties
Optional collection of build step execution conditions
Specifies which Docker image to use for running this build step. I.e. the build step will be run inside specified docker image, using 'docker run' wrapper.
Specifies which Docker image platform will be used to run this build step.
If enabled, "pull image" command will be run before docker run.
Additional docker run command arguments
Build step execution mode
Log stderr output as errors in the build log
Build working directory for the executable, specify it if it is different from the checkout directory.
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Validates this object and reports found errors to the provided consumer