FailureConditions

class FailureConditions : Validatable

Collection of failure conditions in build configuration or template.

Example. Failure contidions defined for build configuration. See concrete build failure conditions for more examples.

buildType {
    // ...
    failureConditions {
        failOnText {
            // ...
        }
        failOnMetricChange {
            // ...
        }
    }
}

See also failureConditions().

Constructors

Link copied to clipboard
fun FailureConditions()

Functions

Link copied to clipboard
fun failureCondition(failureCondition: FailureCondition)

Adds the specified failure condition

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

Adds a failure condition initialized with the specified init block

Link copied to clipboard
fun option(name: String, value: String)

Sets option with specified name and value

Link copied to clipboard
open override fun validate(consumer: ErrorConsumer)

Validates this object and reports found errors to the provided consumer

Properties

Link copied to clipboard
var errorMessage: Boolean

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

Link copied to clipboard
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

Link copied to clipboard
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.

Link copied to clipboard
var nonZeroExitCode: Boolean

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

Link copied to clipboard
var supportTestRetry: Boolean

If true, successful test runs of the same test will mute previous test failure in the same build By default false.

Link copied to clipboard
var testFailure: Boolean

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

Extensions

Link copied to clipboard
fun FailureConditions.copy(): FailureConditions

Copies the receiver failure conditions

Link copied to clipboard
fun FailureConditions.copyTo(target: FailureConditions): FailureConditions

Copies the receiver failure conditions to the specified target

Link copied to clipboard

Adds a build failure condition failing build on metric change.

Link copied to clipboard
fun FailureConditions.failOnText(init: BuildFailureOnText.() -> Unit): BuildFailureOnText

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