jetbrains.buildServer.configs.kotlin.v2017_2 / VcsRoot

VcsRoot

open class VcsRoot : Parametrized, Validatable

A base class representing TeamCity VCS root.

To appear in UI a VCS root should be registered in a project using the vcsRoot method.

VCS root can be attached to a build configuration or template with specified checkout rules using the root() method in the vcs() block.

The uuid, id, name, and type are mandatory properties for a valid VCS root.

VCS root parameters can be defined via the param method. TeamCity vcs plugins extend this class and provide a typed DSL which makes editing parameters easier.

See Also

Project

BuildType

Template

Constructors

<init>

VcsRoot(init: VcsRoot.() -> Unit)

Creates a VCS root and initializes it with the specified init block

VcsRoot()

A base class representing TeamCity VCS root.

Properties

extId

var extId: String

VCS root 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 id, you should find all its occurrences in the current project and change them too.

id

var id: String

VCS root 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 id, you should find all its occurrences in the current project and change them too.

name

var name: String

VCS root name

pollInterval

var pollInterval: Int?

VCS root polling interval

type

var type: String

VCS type

uuid

var uuid: String

VCS root uuid. It is mandatory, TeamCity uses it to identify entities. If root's uuid changes, TeamCity considers it to be a new VCS root.

Inherited Properties

params

val params: List<Parameter>

Functions

create

open fun create(): VcsRoot

Creates an instance of this VCS root 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.

equals

open fun equals(other: Any?): Boolean

toString

open fun toString(): String

validate

open fun validate(consumer: ErrorConsumer): Unit

Validates this object and reports found errors to the provided consumer

Inherited Functions

booleanParameter

fun booleanParameter(customName: String? = null, trueValue: String? = "true", falseValue: String? = "false"): SingleDelegateProvider<Boolean>

compoundParameter

fun <T : CompoundParam<T>> compoundParameter(customName: String? = null): CompoundDelegateProvider<T>

copyParamsTo

fun <T : Parametrized> copyParamsTo(target: T): T

Copies parameters of this object to the specified target

enumParameter

fun <E : Enum<E>> enumParameter(customName: String? = null, mapping: Map<E, String?>? = null): SingleDelegateProvider<E>

findRawParam

fun findRawParam(paramName: String): Parameter?

hasParam

fun hasParam(paramName: String): Boolean

intParameter

fun intParameter(customName: String? = null): SingleDelegateProvider<Int>

param

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

Adds parameter with specified name and value

removeRawParam

fun removeRawParam(paramName: String): Unit

stringParameter

fun stringParameter(customName: String? = null): SingleDelegateProvider<String>

Extension Functions

copy

fun <T : VcsRoot> T.copy(): T

Copies the receiver VCS root.

fun <T : VcsRoot> T.copy(block: T.() -> Unit): T

Copies the receiver VCS root and initialize it with the specified block.

copyTo

fun <T : VcsRoot> T.copyTo(target: T): T

Copies the receiver VCS root to the specified target VCS root

Inheritors

GitVcsRoot

open class GitVcsRoot : VcsRoot

Git VCS root

HgVcsRoot

open class HgVcsRoot : VcsRoot

Mercurial VCS root

PerforceVcsRoot

open class PerforceVcsRoot : VcsRoot

Perforce VCS root

SvnVcsRoot

open class SvnVcsRoot : VcsRoot

A Subversion VCS root

TfsVcsRoot

open class TfsVcsRoot : VcsRoot

TFS VCS root