afterScript

fun afterScript(block: CommandDsl.() -> Unit)(source)

Adds commands to execute after the main script of this job.

afterScript has the same syntax as script.

The main usage of afterScript is the ability to declare a script that will execute after all script calls, even those that haven't happened yet.

Example

val test by job {
script {
shell("make")
}

afterScript {
// Something that executes after all scripts
}
}

External resources

Read more about the differences between script and afterScript in the GitLab documentation.