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
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. |
var allowExternalStatus: Boolean?
If true, viewing of the configuration status is allowed externally. By default false. |
|
var artifactRules: String?
Artifact publishing rules. By default empty, ie. no artifacts will be published by build |
|
var buildNumberPattern: String?
Build number pattern. By default "%build.counter%" |
|
var description: String
Description of a template or build configuration |
|
var detectHangingBuilds: Boolean?
Enables hanging builds detection. By default true. |
|
var enablePersonalBuilds: Boolean?
Controls whether personal builds can be triggered in this build configuration. By default true. |
|
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. |
|
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. |
|
open var name: String
BuildType or template name. It should be unique across buildTypes and templates in a project. |
|
var publishArtifacts: PublishMode?
For which builds publish artifacts |
|
var type: Type?
Type of this build configuration, when not specified treated as Type.REGULAR |
|
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. |
fun cleanup(base: Cleanup? = null, init: Cleanup.() -> Unit = {}): Unit
Configures build clean-up rules |
|
fun dependencies(base: Dependencies? = null, init: Dependencies.() -> Unit = {}): Unit
Configures dependencies |
|
fun disableSettings(vararg ids: String): Unit
Disables settings with the specified ids in this buildType |
|
fun failureConditions(base: FailureConditions? = null, init: FailureConditions.() -> Unit = {}): Unit
Configures failure conditions |
|
fun features(base: BuildFeatures? = null, init: BuildFeatures.() -> Unit = {}): Unit
Configures build features |
|
fun option(name: String, value: String): Unit
Sets option with specified name and value |
|
fun params(base: Parametrized? = null, init: ParametrizedWithType.() -> Unit = {}): Unit
Configures build parameters |
|
fun requirements(base: Requirements? = null, init: Requirements.() -> Unit = {}): Unit
Configures agent requirements |
|
fun steps(base: BuildSteps? = null, init: BuildSteps.() -> Unit = {}): Unit
Configures build steps |
|
fun triggers(base: Triggers? = null, init: Triggers.() -> Unit = {}): Unit
Configures build triggers |
|
fun vcs(base: VcsSettings? = null, init: VcsSettings.() -> Unit = {}): Unit
Configures Version Control Settings |