KubernetesExecutor

The default "agentless" Kubernetes integration that allows TeamCity to offload all building tasks to a K8S cluster.

Example. Adds new Kubernetes executor that allows TeamCity to offload builds to Kubernetes

project {
// Other Project settings ...
features {
// Other Project Features ...
        kubernetesExecutor {
id = "PROJECT_EXT_32"
connectionId = "PROJECT_EXT_14"
profileName = "executor"
templateName = "executors-template"
}
}
}

Example. Adds new Kubernetes executor that allows TeamCity to offload builds to Kubernetes. This executor is aware of the parameters available to the executor build.

project {
// Other Project settings ...
features {
// Other Project Features ...
        kubernetesExecutor {
id = "PROJECT_EXT_32"
connectionId = "PROJECT_EXT_14"
profileName = "executor"
containerParameters = "requirement1=value1"
}
}
}

See also

Constructors

Link copied to clipboard
constructor(init: KubernetesExecutor.() -> Unit)
constructor()

Properties

Link copied to clipboard

Maximum number of allowed builds running with the executor

Link copied to clipboard

The Kubernetes connection to use

Link copied to clipboard

Specify parameters in the “name=value” format to be matched against explicit agent requirements of build configurations. Pods without this setting will be compatible only with configurations that impose no explicit requirements. Format: parameter1=value1,parameter2=value2"

Link copied to clipboard

A small description of the current profile

Link copied to clipboard

If executor is enabled for the project

Link copied to clipboard
var id: String?

Project feature id, if not specified will be generated

Link copied to clipboard
Link copied to clipboard

Display name of the profile

Link copied to clipboard

The TeamCity URL for executor instances to connecto to. Leave empty to use default URL

Link copied to clipboard

A template of a pod with a single container with the settings to be applied to the build

Link copied to clipboard

The template's name with a pod with a single container with the settings to be applied to the build. The template must be available in the cluster of the selected connection.

Link copied to clipboard

Project feature type

Functions

Link copied to clipboard
fun booleanParameter(customName: String? = null, trueValue: String? = "true", falseValue: String? = "false"): DelegateProvider<Boolean?>
Link copied to clipboard
fun clear()
Link copied to clipboard
fun <T : CompoundParam<T>> compoundParameter(customName: String? = null): DelegateProvider<T>
Link copied to clipboard
fun <T : Parametrized> copyParamsTo(target: T): T

Copies parameters of this object to the specified target

Link copied to clipboard

Creates an instance of this project feature 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.

Link copied to clipboard
fun doubleParameter(customName: String? = null): DelegateProvider<Double>
Link copied to clipboard
fun <E : Enum<E>> enumParameter(customName: String? = null, mapping: Map<E, String?>? = null): DelegateProvider<E>
Link copied to clipboard
fun findRawParam(paramName: String): Parameter?
Link copied to clipboard
fun hasParam(paramName: String): Boolean
Link copied to clipboard
fun intParameter(customName: String? = null): DelegateProvider<Int>
Link copied to clipboard
fun param(name: String, value: String)

Adds parameter with specified name and value

Link copied to clipboard
fun removeRawParam(paramName: String)
Link copied to clipboard
open fun stringParameter(customName: String? = null): DelegateProvider<String>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun validate(consumer: ErrorConsumer)

Validates this object and reports found errors to the provided consumer