TeamCity On-Premises 2023.11 Help

Adding Build Features

A build feature is a piece of functionality that can be added to a build configuration to affect running builds or reporting build results.

TeamCity Build Features

TeamCity ships with the following build features that can be added to your configurations:

AssemblyInfo Patcher

Allows you to set a build number to an assembly automatically, without having to patch the AssemblyInfo.cs files manually. Learn more...

Automatic Merge

Tracks builds in required branches and merges them into a target branch if a build satisfies the configured condition (for example, the build is successful). Learn more...

AWS Credentials

Shares an AWS connection configured in a TeamCity project to build steps. Learn more...

Build Approval

Allows you to specify TeamCity users whose approval is required to start a new build. Learn more...

Build Files Cleaner (Swabra)

Cleans files produced during a build. Learn more...

Build Cache

Allows builds to obtain files acquired by previously finished builds (for example, downloaded npm packages. Learn more...

Commit Status Publisher

Reports build stages and final results to an external system. Learn more...

Docker Support

Allows build configurations to automatically sign in a DockerHub or other container registry before the build start. Learn more...

File Content Replacer

Uses regular expressions to replace contents of text files before the build starts, and rolls back all changes after the build finishes. Learn more...

Free Disc Space

Checks whether a build agent has enough free disc space before it runs a build, and cleans up old build data in case it does not.  Learn more...

Golang

Enables the real-time reporting and history of Go test results in TeamCity. Learn more...

Investigations Auto Assigner

Analyzes build problems and test failures, and identifies users whose commits potentially led to these problems. Learn more...

Jira Cloud Integration

Allows reporting build statuses directly to Jira Cloud in real time. Learn more...

Matrix Build

Allows you to set up a matrix where multiple parameters have several potential values each. Running such build configurations spawns N separate builds that test each individual parameter/value combination. Learn more...

Notifications

Notifies required users about build statuses and events via e-mails or Slack messages. Learn more...

NuGet Feed Credentials

Allows builds to interact with NuGet feeds that require authentication. Learn more...

NuGet Packages Indexer

Indexes NuGet packages and adds them to TeamCity remote private feeds, with no need for additional authorization. Learn more...

Performance Monitor

Allows you to get the statistics on the CPU, disk I/O, and memory usage during a build run on a build agent.  Learn more...

Pull Requests

Allows you to build changes that have not yet been merged to a target repository branch. Learn more...

Ruby Environment Configurator

Adds the selected Ruby interpreter and gems bin directories to the system PATH environment variable and configures other necessary environment variables in case of the RVM interpreter. Learn more...

Parallel Tests

Breaks down a huge number of tests into smaller batches, and employs multiple TeamCity agents to run each batch. Learn more...

Shared Resources

Allows limiting concurrently running builds using a shared external (to the CI server) resource (for example, a test database or a server with a limited number of connections). Learn more...

SSH Agent

Runs an SSH agent with the selected uploaded SSH key during a build.  Learn more...

VCS Labeling

Enables automatic and manual labelling (tagging) build sources in your Version Control System. Learn more...

XML Report Processing

Parses XML reports produced by external tools and displays results on build pages. Learn more...

How to Add, Remove, and Disable Build Features

In TeamCity UI

  1. Navigate to Administration | <YOUR_PROJECT> | <YOUR_BUILD_CONFIGURATION> and switch to the Build Features tab.

    Add New Build Feature
  2. Click Add build feature and choose a required feature from the list.

  3. Specify required feature settings and click Save.

The Build Features page also allows you to temporarily disable or permanently remove a configured build feature.

Disable or delete a build feature

In Kotlin DSL

Add a corresponding feature to the Approval block of your Kotlin DSL. For example, the following sample adds the Build Approval feature that requires one user to approve new configuration builds.

object MyBuildConfig : BuildType({ // ... features { approval { approvalRules = "user:Valravn" } } })

See also: Build Features | Kotlin DSL Documentation.

Using REST API

Send GET, POST, and DELETE requests to the /app/rest/buildTypes/<build_type_locator>/features endpoint to obtain and remove existing build features and add new ones.

For example, a POST request using the following body adds the Pull Requests feature to the configuration.

{ "type": "pullRequests", "properties": { "property": [ { "name": "providerType", "value": "github" }, { "name": "ignoreDrafts", "value": "true" } ] } }
<feature type="pullRequests"> <properties count="2"> <property name="ignoreDrafts" value="true"/> <property name="providerType" value="github"/> </properties> </feature>

To disable an existing feature, send a PUT request with the true text body to the /app/rest/buildTypes/<build-type-locator>/features/<ID>/disabled.

Last modified: 04 March 2024