jetbrains.buildServer.configs.kotlin.v10 / Template

Template

open class Template : BuildTypeSettings

Represents TeamCity build template.

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

The uuid, extId, and name are mandatory properties for a valid template.

Template settings are grouped into blocks similar to tabs in the build template admin UI:

See Also

Project

BuildType

VcsRoot

Constructors

<init>

Template(init: Template.() -> Unit = {}, base: Template? = null)

Creates a new template. Copies all settings from the specified base (if it is not null) and runs the init function on the created instance.

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.

extId

open var extId: String

BuildType or template external id. It appears in web UI and is used in urls. Can be changed at any time. But be aware that some settings use it, e.g. as a part of parameter reference. If you change the extId, you should find all its occurrences in the current project and change them too. ExtId is unique across all buildTypes and templates on the server.

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

open var name: String

BuildType or template name. It should 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

open var uuid: String

BuildType or template uuid. It is mandatory. TeamCity uses it to identify entities. If buildType's or template's uuid changes, TeamCity considers it to be a new entity. Uuid is unique across all entities on the server.

Inherited Functions

cleanup

fun cleanup(base: Cleanup? = null, init: Cleanup.() -> Unit = {}): Unit

Configures build clean-up rules

dependencies

fun dependencies(base: Dependencies? = null, 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(base: FailureConditions? = null, init: FailureConditions.() -> Unit = {}): Unit

Configures failure conditions

features

fun features(base: BuildFeatures? = null, init: BuildFeatures.() -> Unit = {}): Unit

Configures build features

option

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

Sets option with specified name and value

params

fun params(base: Parametrized? = null, init: ParametrizedWithType.() -> Unit = {}): Unit

Configures build parameters

requirements

fun requirements(base: Requirements? = null, init: Requirements.() -> Unit = {}): Unit

Configures agent requirements

steps

fun steps(base: BuildSteps? = null, init: BuildSteps.() -> Unit = {}): Unit

Configures build steps

triggers

fun triggers(base: Triggers? = null, init: Triggers.() -> Unit = {}): Unit

Configures build triggers

vcs

fun vcs(base: VcsSettings? = null, init: VcsSettings.() -> Unit = {}): Unit

Configures Version Control Settings