Skip to content

GitLab CI Kotlin DSLopensavvy.gitlab.ciJobCompanionget

get

operator fun get(name: String): Job

Creates an instance of the Job class to access jobs declared outside this Kotlin file.

Instances generated by this method have no data, and any changes made on them are ignored during generation.

If you must refer to a job that is part of the same pipeline, prefer writing both Kotlin variables to join them:

val foo by job {
    // …
}

val bar by job {
    dependsOn(foo)
    // …
}