beforeScript
Adds commands to execute before the main script of this job.
beforeScript
has the same syntax as script.
The main usage of beforeScript
is the ability to declare a script that will execute before all already-registered calls to script.
Example
val test by job {
beforeScript {
shell("apt upgrade")
}
script {
shell("echo Hello world")
}
}
Content copied to clipboard
External resources
Read more about the differences between script and beforeScript
in the GitLab documentation.