This plugin adds the ability to write build steps as Groovy script.
Here’s a screenshot of the build runner:
The script exposes the following variables:
-
system
: system properties (typeMap
) -
env
: environment variables (typeMap
) -
params
: all build parameters (typeMap
) -
configParams
: configuration parameters (typeMap
) -
agent
: the build agent (typejetbrains.buildServer.agent.AgentRunningBuild
) -
context
: the build execution context (type:jetbrains.buildServer.agent.BuildRunnerContext
) -
log
: build runner logger (type:jetbrains.buildServer.agent.BuildProgressLogger
)
For messages to appear into the build log, you mustn’t use println
. Instead, use the build logger:
system.each { k, v ->
log.message "System property: $k = $v"
}