Skip to content

GitLab CI Kotlin DSLopensavvy.gitlab.ciEnvironmentstopJob

stopJob

fun stopJob(stopJob: Job)

Specifies a stopJob that will be executed once the environment should be stopped.

The stop job should have the same configuration but without a declared url.

Example

val stopQa by job {
    script {
        // …
    }

    environment {
        name("qa")
    }
}

val deployQa by job {
    script {
        // …
    }

    environment {
        name("qa")
        url("https://qa.your.app/dashboard")
        onStop(stopQa)
    }
}

External resources