open class Template : BuildTypeSettings, Validatable
Represents TeamCity build template.
To appear in UI a template should be registered in a project using the template method.
The uuid, id, 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)
Creates a template and initializes it with the specified init block Template()
Represents TeamCity build template. |
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. |
|
var
BuildType or template id. It appears in the 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 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. |
|
var id: String
BuildType or template id. It appears in the 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 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. |
|
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. |
|
var name: String
BuildType or template name. It must 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 |
|
var uuid: String
BuildType or template uuid. Is mandatory. TeamCity uses it to identify the entity. If uuid changes, TeamCity considers it to be a new entity. Uuid must be unique across all entities on the server. |
open fun create(): Template
Creates an instance of this template 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. |
|
open fun toString(): String |
fun cleanup(init: Cleanup.() -> Unit): Unit
Configures build clean-up rules |
|
fun dependencies(init: Dependencies.() -> Unit): Unit
Configures dependencies |
|
fun disableSettings(vararg ids: String): Unit
Disables settings with the specified ids in this buildType |
|
fun failureConditions(init: FailureConditions.() -> Unit): Unit
Configures failure conditions |
|
fun features(init: BuildFeatures.() -> Unit): Unit
Configures build features |
|
fun option(name: String, value: String): Unit
Sets option with specified name and value |
|
fun params(init: ParametrizedWithType.() -> Unit): Unit
Configures build parameters |
|
fun requirements(init: Requirements.() -> Unit): Unit
Configures agent requirements |
|
fun steps(init: BuildSteps.() -> Unit): Unit
Configures build steps |
|
fun triggers(init: Triggers.() -> Unit): Unit
Configures build triggers |
|
open fun validate(consumer: ErrorConsumer): Unit
Validates this object and reports found errors to the provided consumer |
|
fun vcs(init: VcsSettings.() -> Unit): Unit
Configures Version Control Settings |