jetbrains.buildServer.configs.kotlin.v2019_2.vcs / GitVcsRoot

GitVcsRoot

open class GitVcsRoot : VcsRoot

Git VCS root

Types

AgentCleanFilesPolicy

enum class AgentCleanFilesPolicy

Specifies flags for the "git clean" command during agent-side checkout and defines which files will be removed.

AgentCleanPolicy

enum class AgentCleanPolicy

Specifies when the "git clean" command should be executed in case of agent-side checkout

AuthMethod

sealed class AuthMethod : CompoundParam<AuthMethod>

CheckoutSubmodules

enum class CheckoutSubmodules

Submodules checkout mode

UserNameStyle

enum class UserNameStyle

Defines how TeamCity retrieves VCS username from git commit. When the git config contains the following

Constructors

<init>

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

Git VCS root

Properties

agentCleanFilesPolicy

var agentCleanFilesPolicy: AgentCleanFilesPolicy?

Specifies which files should be removed when "git clean" command is executed during agent-side checkout.

agentCleanPolicy

var agentCleanPolicy: AgentCleanPolicy?

Specifies when the "git clean" command should be executed in case of agent-side checkout

agentGitPath

var agentGitPath: String?

Custom path to git executable on the build agent machine

authMethod

var authMethod: AuthMethod?

VCS Root authentication method

branch

var branch: String?

The default branch name

branchSpec

var branchSpec: String?

Branch specification to use in VCS root

checkoutSubmodules

var checkoutSubmodules: CheckoutSubmodules?

Whether VCS root should include changes in submodules and check their sources for build. By default submodules are checked out.

pushUrl

var pushUrl: String?

Custom repository push url. If not specified then the url specified in the url property is used for push operations.

serverSideAutoCRLF

var serverSideAutoCRLF: Boolean?

Whether TeamCity should convert line-endings of all text files to CRLF during server-side checkout. By default false.

url

var url: String?

Repository url

useMirrors

var useMirrors: Boolean?

When this option is enabled, TeamCity creates a separate clone of the repository on each agent and uses it in the checkout directory via git alternates. This make agent-side checkout faster. By default true.

useTagsAsBranches

var useTagsAsBranches: Boolean?

When enabled tags matched by branch specification will be shown in UI as regular branches. By default false.

userForTags

var userForTags: String?

A username for tag/merge operations in this VCS root. Format: Username

userNameStyle

var userNameStyle: UserNameStyle?

Defines how TeamCity retrieves VCS username from git commit.

Inherited Properties

id

open var id: Id?

VCS root id. It appears in the web UI and is used in urls. If the VCS root has a uuid specified, then the id can be changed at any time. If uuid is omitted, then TeamCity treats a VCS root with a changed id as a new VCS root, all data associated with the old root will be lost (e.g. a commits graph). 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 VCS roots 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.v2019_2 package).

name

var name: String

VCS root name

paramRefs

open val paramRefs: VcsRootRefs

Helper for creating references to parameters of this VCS root

pollInterval

var pollInterval: Int?

VCS root polling interval

type

var type: String

VCS type

uuid

var uuid: String

VCS root uuid. TeamCity uses it to identify the VCS root. If uuid changes, TeamCity considers it to be a new entity. If uuid is missing, it is reconstructed from VCS root id. Uuid must be unique across all entities on the server.

Functions

anonymous

fun anonymous(): Anonymous

Anonymous repository access

customPrivateKey

fun customPrivateKey(init: CustomPrivateKey.() -> Unit = {}): CustomPrivateKey

SSH key on the specified path. Supported only for server-side checkout. Switch to uploaded SSH key if you want to use an agent-side checkout.

defaultPrivateKey

fun defaultPrivateKey(init: DefaultPrivateKey.() -> Unit = {}): DefaultPrivateKey

Default SSH key found on the machine. If you use an agent-side checkout, then this key should also be available on the build agent machines. Often it is easier to use the uploaded SSH key.

password

fun password(init: Password.() -> Unit = {}): Password

Password authentication

uploadedKey

fun uploadedKey(init: UploadedKey.() -> Unit = {}): UploadedKey

Uploaded SSH key with the specified name.

validate

open fun validate(consumer: ErrorConsumer): Unit

Validates this object and reports found errors to the provided consumer

Inherited 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

id

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.

toString

open fun toString(): String