GitLab CI Kotlin DSL • opensavvy.gitlab.ci • Job • script
script¶
fun script(block: CommandDsl.() -> Unit)
Adds commands to execute in this job.
Example¶
val test by job {
script {
shell("echo Hello World")
}
script {
shell("echo You can call 'script' multiple times")
shell("echo or add multiple commands inside a single 'script' call")
}
}
Calling script
multiple times executes the commands after the previous ones (the execution happens in the same order as in the source code).
See CommandDsl
to see what functions are available in script
.