id

fun id(id: String)

Sets the relative part of the id to the specified value.

Example. Explicitly defined id

object MyBuild: BuildType({
id("RunTests")
name = "Run tests"
})

In the example above "RunTests" is the suffix of the final build configuration id. To construct the final id, the id of the project where Kotlin DSL is enabled is appended as a prefix.

Example. Build configuration without explicit id

object MyBuild: BuildType({
name = "Run tests"
})

In this case id of the build configuration is determined automatically from the class name: MyBuild


open override 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 package).

See also