BuildFeatures

class BuildFeatures : Validatable

Collection of build features in build configuration or template.

Example. Add approval to the build

See also Approval

features {
    approval {
        approvalRules = "user:qa"
    }
}

Example. Import test results into TeamCity from the JUnix test results XML files

See also XML report processing

features {
    xmlReport {
        reportType = XmlReport.XmlReportType.JUNIT
        rules = "test-reports/**.xml"
    }
}
*/

See also features().

Constructors

Link copied to clipboard
fun BuildFeatures()

Functions

Link copied to clipboard
fun feature(feature: BuildFeature)

Adds the specified build feature

fun feature(init: BuildFeature.() -> Unit): BuildFeature

Adds a build feature initialized with the specified init block

Link copied to clipboard
open override fun validate(consumer: ErrorConsumer)

Validates this object and reports found errors to the provided consumer

Extensions

Link copied to clipboard
fun BuildFeatures.approval(init: Approval.() -> Unit): Approval

Make build require manual approval before it will be assigned to an agent

Link copied to clipboard

Adds a build feature which updates the AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion attributes in AssemblyInfo files under Properties folders. No additional attributes will be added, make sure you have all necessary attributes in the source code. Changed source files are reverted at the end of a build.

Link copied to clipboard
fun BuildFeatures.buildCache(init: BuildCacheFeature.() -> Unit): BuildCacheFeature

Adds a build cache to the build

Link copied to clipboard

Enables status publishing to external system

Link copied to clipboard
fun BuildFeatures.copy(): BuildFeatures

Copies the receiver build features

Link copied to clipboard
fun BuildFeatures.copyTo(target: BuildFeatures): BuildFeatures

Copies the receiver build features to the specified target

Link copied to clipboard
fun BuildFeatures.dockerSupport(init: DockerSupportFeature.() -> Unit): DockerSupportFeature

Example.

Link copied to clipboard
fun BuildFeatures.freeDiskSpace(init: FreeDiskSpace.() -> Unit): FreeDiskSpace

Adds a free disk space check to the build configuration or template

Link copied to clipboard
fun BuildFeatures.golang(init: GolangFeature.() -> Unit): GolangFeature

Example. Adds a Golang build feature for test reporting. Note that additional -json command line argument is specified for tests run.

Link copied to clipboard

Configures Investigations Auto Assigner behaviour.

Link copied to clipboard

Provides integration with Jira Cloud via its Build and Deployment APIs

Link copied to clipboard
fun BuildFeatures.matrix(init: MatrixFeature.() -> Unit = {})

The Matrix Builds feature allows you to define a build configuration with different sets of parameters/parameter values. Running this build configuration creates a batch of separate builds, each running its own parameter set.

Link copied to clipboard
fun BuildFeatures.merge(init: AutoMerge.() -> Unit): AutoMerge

Enables automatic merge in the build configuration or template

Link copied to clipboard
fun BuildFeatures.notifications(init: Notifications.() -> Unit): Notifications

Add notification rule

Link copied to clipboard

Example. Adds an npm registry build feature. Please note that corresponding connection project feature should be provided in project. This connection will be used only inside nodeJS build steps.

Link copied to clipboard

Provides NuGet feed credentials for feed

Link copied to clipboard

Enables NuGet packages indexing into feed

Link copied to clipboard
fun BuildFeatures.parallelTests(init: ParallelTestsFeature.() -> Unit): ParallelTestsFeature

Example. Enables tests parallelization. Uses 3 parallel batches to run tests.

Link copied to clipboard
fun BuildFeatures.perfmon(init: Perfmon.() -> Unit): Perfmon

Adds a build feature build feature

Link copied to clipboard

Example. Provides AWS Credentials of chosen AWS Connection to the Build Agent

Link copied to clipboard
fun BuildFeatures.pullRequests(init: PullRequests.() -> Unit): PullRequests
Link copied to clipboard
fun BuildFeatures.replaceContent(init: FileContentReplacer.() -> Unit): FileContentReplacer

Adds a build feature which processes text files by performing regular expressions

Link copied to clipboard

Adds a Ruby Environment Configurator build feature passes Ruby interpreter to all build steps.

Link copied to clipboard
fun BuildFeatures.sharedResources(init: SharedResources.() -> Unit = {})

Adds a Shared Resource build feature which allows limiting concurrently running builds using a shared resource. Note that corrensponding Shared Resources project feature should be defined.

Link copied to clipboard
fun BuildFeatures.sshAgent(init: SshAgent.() -> Unit): SshAgent

Adds a build feature which runs SSH agent during a build with the specified SSH key loaded

Link copied to clipboard
fun BuildFeatures.swabra(init: Swabra.() -> Unit): Swabra

Adds a build feature cleaning files and processes created during a build

Link copied to clipboard
fun BuildFeatures.vcsLabeling(init: VcsLabeling.() -> Unit): VcsLabeling

Enables automatic VCS labeling in a build

Link copied to clipboard
fun BuildFeatures.xmlReport(init: XmlReport.() -> Unit): XmlReport

Adds a build feature parses xml report produced by external tools and present them as build results