dependency

fun dependency(jobId: String)

Adds a dependency on a job with the specified id.

Example:

dependency("build")

Parameters

jobId

id of the job to depend on


fun dependency(jobId: String, files: List<String>)

Adds a dependency on a job with the specified id and a list of files.

Example:

dependency("build", listOf("build/libs/app.jar", "build/reports"))

Parameters

jobId

id of the job to depend on

files

list of files to depend on


fun dependency(jobId: String, init: Job.Dependency.() -> Unit)

Adds a dependency on a job with the specified id and configures its options via a block.

Example:

dependency("build") {
runJobIfUpstreamFails = true
}
dependency("test") {
files = listOf("build/reports/**/*")
runJobIfUpstreamFails = true
}

Parameters

jobId

id of the job to depend on

init

function to configure the dependency options


fun dependency(job: Job)

Adds a dependency on the specified job.

Example:

dependency(Build)

Parameters

job

the job to depend on


fun dependency(job: Job, files: List<String>)

Adds a dependency on the specified job with a list of files.

Example:

dependency(Build, listOf("build/libs/app.jar", "build/reports"))

Parameters

job

the job to depend on

files

list of files to depend on


fun dependency(job: Job, init: Job.Dependency.() -> Unit)

Adds a dependency on the specified job and configures its options via a block.

Example:

dependency(Build) {
runJobIfUpstreamFails = true
}

Parameters

job

the job to depend on

init

function to configure the dependency options