Skip to content

GitLab CI Kotlin DSLopensavvy.gitlab.ciRetry

Retry

class Retry : YamlExport

Configuration for job retry behavior.

Example

val test by job {
    retry(3) {
        whenType(RetryWhen.Always)
        onExitCode(127)
    }
}

External resources

Properties

max

val max: Int

The maximum number of times a job is retried if it fails. Supported values: 0, 1, or 2.

Functions

on

fun on(type: RetryCause)

Specifies which failure types to retry on.

onExitCode

fun onExitCode(code: Int)

Specifies which exit codes to retry on.

toYaml

open override fun toYaml(): Yaml

Converts this object into a Yaml object.