jetbrains.buildServer.configs.kotlin.v2018_1 / FailureConditions

FailureConditions

class FailureConditions : Validatable

Collection of failure conditions in build configuration or template

Constructors

<init>

FailureConditions()

Collection of failure conditions in build configuration or template

Properties

errorMessage

var errorMessage: Boolean

If true, build will fail if any error message is received from logger. By default false.

executionTimeoutMin

var executionTimeoutMin: Int

Allows to set max build execution time in minutes. If this threshold is exceeded, build fails. Default value is 0 - means there is no limit in build execution time

javaCrash

var javaCrash: Boolean

If true then build will be marked as failed if out of memory error or process crash is detected. By default true.

nonZeroExitCode

var nonZeroExitCode: Boolean

If true, build will fail if build process exit code was non-zero. By default true.

testFailure

var testFailure: Boolean

If true, build will fail if there is at least one failed test. By default true.

Functions

failureCondition

fun failureCondition(failureCondition: FailureCondition): Unit

Adds the specified failure condition

fun failureCondition(init: FailureCondition.() -> Unit): FailureCondition

Adds a failure condition initialized with the specified init block

option

fun option(name: String, value: String): Unit

Sets option with specified name and value

validate

fun validate(consumer: ErrorConsumer): Unit

Validates this object and reports found errors to the provided consumer

Extension Functions

copy

fun FailureConditions.copy(): FailureConditions

Copies the receiver failure conditions

copyTo

fun FailureConditions.copyTo(target: FailureConditions): FailureConditions

Copies the receiver failure conditions to the specified target

failOnMetricChange

fun FailureConditions.failOnMetricChange(init: BuildFailureOnMetric.() -> Unit): BuildFailureOnMetric

Adds a build failure condition failing build on metric change.

failOnText

fun FailureConditions.failOnText(init: BuildFailureOnText.() -> Unit): BuildFailureOnText

Adds a build failure condition failing build when specified text is found in a build log.