variable

fun variable(name: String, value: String)(source)

Declares an environment variable that will be available for the entire length of the job.

Example

val test by job {
variable("version", "1.0")

script {
shell("echo \$version")
}
}

External resources

See also

Access predefined CI/CD variables.