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 id and name are mandatory properties for a valid template (id can be omitted if it matches the class name).
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. |
|
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 |
|
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. 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. |
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 |
|
open fun validate(consumer: ErrorConsumer): Unit
Validates this object and reports found errors to the provided consumer |
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 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. |
|
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 |
|
fun vcs(init: VcsSettings.() -> Unit): Unit
Configures Version Control Settings |