pipeline

fun pipeline(pipeline: Pipeline)

Registers the specified pipeline in this project.

Example. Pipeline defined as an object

object Main: Project({
name = "Main"
description = "The project main branch"

pipeline(MyPipeline)
})

object MyPipeline: Pipeline({
// ...
})

Parameters

pipeline

pipeline to register

See also


fun pipeline(init: Pipeline.() -> Unit): Pipeline

Registers a new pipeline initialized with the specified block in this project.

A pipeline is a collection of jobs that can be executed in a specific order.

The id and name are mandatory properties for a valid pipeline (id can be omitted if it matches the class name).

Pipeline settings are grouped into blocks:

Example. Pipeline defined in-place

pipeline {
id("BuildAndDeploy")
name = "Build and Deploy"

job {
id("build")
name = "Build"
// steps, outputFiles, etc.
}

job {
id("deploy")
name = "Deploy"
dependency("build")
}
}

Return

added pipeline

Parameters

init

initialization block

See also