jetbrains.buildServer.configs.kotlin.v2018_1 / BuildType

BuildType

open class BuildType : BuildTypeSettings, Validatable

Represents TeamCity build configuration.

To appear in UI a buildType should be registered in a project using the buildType method.

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

BuildType settings are grouped into blocks similar to tabs in the build configuration admin UI:

See Also

Project

Template

VcsRoot

Constructors

<init>

BuildType(init: BuildType.() -> Unit)

Creates a buildType and initializes it with the specified init block

BuildType()

Represents TeamCity build configuration.

Properties

depParamRefs

open val depParamRefs: BuildTypeRefs

Helper for creating references to dependency parameters of this buildType

paused

var paused: Boolean

Whether the buildType is paused

reverseDepParamRefs

open val reverseDepParamRefs: BuildTypeRefs

Helper for creating references to reverse dependency parameters of this buildType

templates

var templates: List<IdOwner>

Ids of the templates this buildType is based on

Inherited Properties

allowExternalStatus

var allowExternalStatus: Boolean

If true, viewing of the configuration status is allowed externally. By default false.

artifactRules

var artifactRules: String

Artifact publishing rules. By default empty, ie. no artifacts will be published by build

buildNumberPattern

var buildNumberPattern: String

Build number pattern. By default "%build.counter%"

description

var description: String

Description of a template or build configuration

detectHangingBuilds

var detectHangingBuilds: Boolean

Enables hanging builds detection. By default true.

enablePersonalBuilds

var enablePersonalBuilds: Boolean

Controls whether personal builds can be triggered in this build configuration. By default true.

id

open var id: Id?

BuildType or template id. It appears in the web UI and is used in urls. If the entity has a uuid specified, then the id can be changed at any time. If uuid is omitted, then TeamCity treats an entity with a changed id as a new entity, all data associated with the old entity will be lost (e.g. a build history). Id can also be used by some settings, e.g. as a part of parameter reference. If you change the id, you should find all its occurrences in the current project and change them too. Id must be unique across all buildTypes and templates on the server. If id is missing, it will be generated from the class name (if the class is not from the jetbrains.buildServer.configs.kotlin.v2018_1 package).

maxRunningBuilds

var maxRunningBuilds: Int

Allows to set maximum number of simultaneously running builds. Default value is 0 - means there is no limit on a number of running builds.

name

var name: String

BuildType or template name. It must be unique across buildTypes and templates in a project.

publishArtifacts

var publishArtifacts: PublishMode

For which builds publish artifacts

type

var type: Type

Type of this build configuration, when not specified treated as Type.REGULAR

uuid

var uuid: String

BuildType or template uuid. TeamCity uses it to identify the entity. If uuid changes, TeamCity considers it to be a new entity. If uuid is missing, it is reconstructed from entity id. Uuid must be unique across all entities on the server.

Functions

create

open fun create(): BuildType

Creates an instance of this buildType via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.

templates

fun templates(vararg ids: Id): Unit
fun templates(vararg ts: Template): Unit

Specifies a number of templates this buildType is based on

toString

open fun toString(): String

validate

open fun validate(consumer: ErrorConsumer): Unit

Validates this object and reports found errors to the provided consumer

Inherited Functions

cleanup

fun cleanup(init: Cleanup.() -> Unit): Unit

Configures build clean-up rules

dependencies

fun dependencies(init: Dependencies.() -> Unit): Unit

Configures dependencies

disableSettings

fun disableSettings(vararg ids: String): Unit

Disables settings with the specified ids in this buildType

failureConditions

fun failureConditions(init: FailureConditions.() -> Unit): Unit

Configures failure conditions

features

fun features(init: BuildFeatures.() -> Unit): Unit

Configures build features

id

fun id(id: String): Unit

Sets the id to the specified value. Type of the id depends on the context in which DSL is executed: it is RelativeId when DSL context is relative, otherwise it is AbsoluteId.

option

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

Sets option with specified name and value

params

fun params(init: ParametrizedWithType.() -> Unit): Unit

Configures build parameters

requirements

fun requirements(init: Requirements.() -> Unit): Unit

Configures agent requirements

steps

fun steps(init: BuildSteps.() -> Unit): Unit

Configures build steps

triggers

fun triggers(init: Triggers.() -> Unit): Unit

Configures build triggers

vcs

fun vcs(init: VcsSettings.() -> Unit): Unit

Configures Version Control Settings