TeamCity 2021.2: Taking Your CI/CD to the Next Level

TeamCity 2021.2 introduces two-factor authentication, brings a variety of updates to the integration with Perforce Helix Core and Perforce Helix Swarm, and further integrates with JetBrains Space. Users of Azure DevOps can now log in to TeamCity using their Azure AD accounts, and C# developers will love the ability to set up build steps using the new C# script build runner. There are also a number of improvements to the Kotlin DSL syntax and multiple updates to the Sakura UI.

More ways to be more secure

More ways to be more secure

CI/CD is a core element of every modern development process, and keeping it well secured is critical. To further strengthen the security of their CI/CD servers, TeamCity administrators can now enable two-factor authentication and require users to enter an additional authentication code to log in.

Perforce integration, taken further

Of all the different version control systems, Perforce Helix has a special place in our hearts, as the TeamCity+Perforce combo is the de facto CI/CD standard in many industries. TeamCity 2021.2 reinforces the integration with a range of great new features.

Running builds on shelved changelists

The Run custom build feature now allows you to run personal builds with changes from a shelved changelist in Perforce. You can trigger a whole build chain on such a changelist and see the list of shelved files inside the TeamCity UI.

Perforce Shelve Trigger

We have added the new Perforce Shelve Trigger, which detects new and modified shelved changelists whose descriptions contain a given keyword and triggers personal builds on them.

Perforce Helix Swarm reporting

We have extended the Commit Status Publisher build feature by adding the new Perforce Swarm publisher. When the publisher is configured, TeamCity will send the information about builds to the Perforce Helix Swarm server, and the respective comments will be added to Swarm reviews on shelved changelists.

Automatic labels

The VCS labeling build feature now creates automatic labels in the Helix server. These labels work as aliases for changelist numbers. Compared to the static labels that were used in previous versions of TeamCity, these give you a significant boost in performance.

Parameterized connection variables

Perforce connection parameters are now passed to TeamCity as build parameters, allowing you to distinguish between different Perforce VCS roots when a project uses multiple Perforce connections.

A few steps closer to Space

If your team uses JetBrains Space – a new all-in-one solution for software teams and projects that was recently released by our company – then you will surely enjoy the new integrations that we’ve added in this version of TeamCity.

VCS roots, projects, and build configurations

Authentication

Version 2021.2 adds the new JetBrains Space authentication module, which allows you to log in using your Space account, just like you can log in with GitHub or GitLab.

VCS roots, projects, and build configurations

Previously, a configured connection with Space only allowed you to access its repositories and publish the status of your builds. The new version of TeamCity also allows you to add VCS roots, create projects, and create build configurations – all you need to do is add the necessary access rights on the Space side.

Authenticating via Azure DevOps

We have received a lot of requests from users who use TeamCity and Azure DevOps at the same time to build their software. To make their experience smoother, TeamCity 2021.2 adds the new Azure DevOps OAuth 2.0 authentication module, which allows you to log in to TeamCity with an Azure AD account.

Simplifying CI/CD for C# developers

Simplifying CI/CD for C# developers

If you are like most C# developers, then you probably find it really annoying to use PowerShell every time you need to set up a build environment, manage Windows processes, or simply move some files. We feel your pain! That’s why we’ve created the new C# Script build runner, which gives you an easy way to write build steps in a real programming language. You no longer have to spend time googling how to write things in PowerShell – you can just use simple C# scripts.

The new build runner is cross-platform, works on any system with Docker, and comes with built-in support for NuGet.

More ways to set up continuous integration with the Kotlin DSL

We are continuing to improve the Kotlin DSL, making it even easier to manage CI/CD configurations as code. Starting with TeamCity 2021.2, you can configure elements of your pipelines that were previously not covered by the Kotlin DSL, such as issue trackers, custom charts, or shared resources. For a full list of the Kotlin DSL changes, please refer to this request in YouTrack.

Sakura UI

Sakura UI

With the Sakura UI, our goal is to make sure that every developer can quickly find what they need, regardless of the size or complexity of their projects. Version 2021.2 adds two views from the classic UI that were absent in the Sakura UI: Pending Changes and Change Details.

Additionally, usernames now display avatars next to them, so you can identify the authors of commits more easily. This was added to both the Sakura UI and the classic UI.

For the full list of changes in version 2021.2, please take a look at the TeamCity documentation.

TeamCity 2021.1: Taking Your CI/CD To The Next Level

TeamCity 2021.1 brings brand-new build runners for Kotlin and Node.js, improves integration with Perforce, and enables a whole range of new workflows by allowing build triggers which define parameters to be used inside build scripts. Users with demanding availability requirements will love the new option to transfer main server responsibilities to secondary nodes in the runtime with minimum downtime. There are also multiple updates to the Sakura UI that will make your work with TeamCity easier, faster, and more enjoyable.

Build. Test. Win.

Kotlin script build runner

Over the past several years, Kotlin has grown immensely. We have seen a lot of interest in using it not only to configure pipelines as code, but also to write build scripts.

The new Kotlin script build runner is a great choice in a huge variety of scenarios. It is cross-platform, supports importing external libraries, and can be used in most places where you currently use the Command Line build runner.

Node.js build runner

Today, JavaScript is the most popular programming language in the world, and a lot of this is due to Node.js, the world’s leading JavaScript runtime. TeamCity 2021.1 comes with a new Node.js build runner that provides first class support for building your web applications. It supports npm and yarn, can work with public and private registries, and automatically detects build steps based on package.json. Just like with all other build runners in TeamCity, you can run your builds inside a Docker container and set them up using a Kotlin-based configuration.

Thread dumps for Docker-based builds

TeamCity has always allowed viewing thread dumps of processes running on build agents. However, when your build was run in Docker, this was difficult. Version 2021.1 lets you view thread dumps of Java processes running in Docker containers on any operating system. For Linux-based Docker containers, you can also see the list of other running commands and their parameters.

In addition to the new Kotlin and Node.js build runners and thread dump viewing improvements, the new version features improved ReSharper Inspections and Duplicates Finder build runners which are now cross-platform and can run in Docker.

May Perforce be with you

TeamCity has always been famous for its ability to scale to large projects with lots of big files, as well as for its top-notch integration with Perforce. Version 2021.1 brings the Perforce integration to the next level with a number of new great features:

  • Improved commit hooks setup. Now you can set up commit hooks and have your builds automatically triggered by installing only one single script on the Perforce server.
  • Perforce workspace cleanup. TeamCity now provides manual and automated clean-up of the Perforce workspaces created by the TeamCity server.
  • ChangeView specification support. You can now limit the VCS root scope to particular revisions with the use of the ChangeView specifications. Usage of the @revision syntax in the import statements of Perforce stream definitions is now also supported.

Hardening the security of your CI

Special care is put into the TeamCity security features, and we keep improving them with every new release.

Greater security with improved access tokens

Greater security with improved access tokens

Version 2021.1 allows you to generate access tokens that are limited in time and scope. Now you can grant scripts that interact with the TeamCity API just enough rights to do their job, without the fear of giving them too much power. You also no longer have to remember to revoke their access after they finish.

Separate permission for personal builds with patches

TeamCity now has a separate permission for running personal builds with custom patches. This helps you ensure that all code executed on build agents is authored only by trusted users.

With great power comes great configurability

Trigger-defined parameters

TeamCity 2021.1 opens new dimensions of control over your build configurations. Your build triggers can now define custom parameters to enable or disable build steps, or change what happens inside your build scripts. For example, your nightly builds can now be different from the builds triggered by version control check-ins, all within the same build configuration.

Git shallow clones

Building on cloud agents just got faster. Starting with 2021.1, you can enable Git shallow cloning and check out the latest version of source code with depth=1, without creating local Git mirrors. This will be particularly useful for companies that spin up clean, short-lived build agents in the cloud for every build.

Multiple VCS triggers support

You are no longer limited to only one VCS trigger per build configuration – TeamCity now allows adding multiple triggers with different rules and with different branch filters. For example, your release branch can be built immediately after the commit, but all other branches will have to wait for their own VCS quiet period.

Disabling UI editing

In TeamCity, you can set up CI/CD pipelines through the UI, through Kotlin configurations, or through a mix of both. However, mixing different methods may lead to a lot of confusion and versioning problems. To ensure that your configurations stay predictable and easy to manage, we have added a new option that will allow administrators to prohibit editing project configurations through the UI if they are set up using Kotlin.

High availability taken even higher

For many large organizations, a highly-available CI is critical to their workflows. TeamCity 2021.1 strengthens multinode setups with three new features.

Switching main node responsibility in runtime

The larger your CI/CD setup is, the more important it is to regularly perform server maintenance tasks. At the same time, any server downtime directly translates into a lapse in your team’s productivity. To allow for high availability and minimize the downtime during maintenance, TeamCity 2021.1 introduces the new “Main TeamCity node” responsibility that can be transferred to a secondary node in runtime. When you do it, the secondary server becomes the main node and automatically receives all of the main node’s responsibilities, including processing builds and managing build agents.

Controlling the number of builds on secondary nodes

Controlling the number of builds on secondary nodes

TeamCity now allows you to define the share of builds that will be processed by its nodes. This helps you make sure that every server takes just the right amount of the build processing load and doesn’t exceed its hardware capabilities.

Elastic-based search

Previously, every TeamCity node had its own search index that was stored locally. Version 2021.1 provides an alternative search engine based on Elasticsearch. It has a distributed index, consumes less disk space, and works more efficiently in multinode installations.

Faster. Higher. Stronger. More beautiful.

Faster. Higher. Stronger. More beautiful.

We are continuing to further improve the Sakura UI, making it faster, easier to use, and supporting all workflows from the classic UI. The new version brings a UI Assistant that shows new users how to navigate around the interface, improvements to the Build Status widget, updates to the Build Overview page, project hierarchy views, and more.

These are just a few of the many great new features in TeamCity 2021.1. For the full list of changes, please refer to the TeamCity documentation.

What’s new in TeamCity 2020.2

TeamCity 2020.2 introduces privacy-friendly login using external services, features the all-new Python build runner, and integrates with Bitbucket Cloud and JetBrains Space. It allows you to execute builds in external services without occupying build agents, and unlocks project editing on secondary servers in multi-node setups. Administrators can now customize the server clean-up schedule and view disk space usage in external storage locations. And you’re going to love the updates to the new Sakura UI.

Say hello with your GitHub, GitLab, or Bitbucket account

Say hello with your GitHub, GitLab, or Bitbucket account

We want continuous integration to be a regular part of every developer’s life. To support more workflows and make the experience with TeamCity smoother, we now support authentication using external services: GitHub, GitLab, and Bitbucket.

TeamCity 2020.2 will instantly match external OAuth accounts with existing TeamCity users, and let them work with their projects without having to enter a password. It integrates with user directory features of the supported services, such as GitHub organizations and GitLab groups, and can automatically create new profiles when new members join your team.

In addition to cloud services, TeamCity 2020.2 supports on-premise installations of GitHub (GitHub Enterprise) and GitLab (GitLab self-hosted).

Bitbucket Cloud: now with pull requests

Version 2020.2 extends the integration with Bitbucket Cloud by adding support for pull requests. Now you can set up TeamCity to automatically pick up pull requests made in your Bitbucket Cloud repository and run the respective builds. Together with the Commit Status Publisher and the Automatic Merge features, this creates an amazing combination, making it possible to work with your favorite tools most efficiently.

Speak Python? Build Python!

As Python becomes the second most popular programming language in the world, you want your continuous integration system to support all of its modern features and development practices. This is why we created the all-new Python build runner, which enables you to use the power and intelligence of TeamCity in your Python projects. The new build runner works with all operating systems, supports virtual environments, and integrates with all common testing frameworks and code inspection tools for Python.

The results of your Python builds and tests are reported in the TeamCity UI, in the same way as with all other TeamCity build runners. You can track changes, analyze failures, assign investigations, and use all the other TeamCity features that you know and love.

A message to Space…

JetBrains Space has been added to the list of services supported by the Commit Status Publisher feature. Until now, to check that your changes didn’t break anything, you had to open up TeamCity and search for your build results there. With the new integration, Commit Status Publisher will automatically send the status of your builds to Space, letting you see it on the Commits page of your project.

Get more out of your agents with agentless build steps

Do your CI/CD pipelines rely on external services, tying up your build agents as they wait for external jobs to finish? Or even worse, do they run in AWS or another cloud, and not only waste your time but also burn your money? Then you’re going to love agentless build steps in TeamCity 2020.2. Your builds can now execute their final steps in agentless mode, releasing the build agents and allowing them to run other queued tasks. TeamCity displays agentless build steps as standard builds and will enable you to track their status, browse their logs, and view their history.

Many servers. One experience.

Our large customers are building more than ever with TeamCity, so we continue to push our multi-server capabilities forward. In version 2020.2, secondary servers make a big step towards primary servers, allowing you to edit project-level settings. This enables your team to set up new builds while the primary server is under maintenance.

Pro features for pro administrators

External storage in Disk Usage monitor

External storage in Disk Usage monitor

An increasing number of our users prefer storing artifacts in the cloud – for example, in Amazon S3. Starting with 2020.2, TeamCity will show you the disk space occupied by builds not only on your local drives but also in remote locations.

Customizable clean-up schedule

Customizable clean-up schedule

The clean-up feature just got more powerful. Now you can customize its schedule with the use of cron-like expressions to have the server cleanup start at regular intervals – for example, on weekends, or twice a day.

Sakura UI: the perfect combination of features and design

Our incredible UI team has been working hard to bring more features and support more use cases in the experimental “Sakura” UI. TeamCity 2020.2 comes with many great things designed not only for end-users but also for plugin developers.

Build Dependencies

Build Dependencies

One of the essential parts of working with CI/CD is the ability to understand the big picture of how everything is built, and TeamCity 2020.2 brings two significant improvements in this area to the Build Dependencies page:

  • The Timeline view now shows not only started and finished builds but also queued builds.
  • The Build Chain view now shows the “right” part of the chain: all builds that depend on the current one.

Test history page

TeamCity 2020.2 adds one more missing piece to the Sakura UI: the new Test History page. The new page gives you detailed information on your tests and allows you to analyze trends, see investigation history, and more.

Build log search

Build log search

We have implemented one of the most popular requests from our users: the build log search. It is now much easier to browse the build log, debug your setup, and understand what happens during your builds.

Sakura UI plugin development framework

TeamCity has always provided extension points and allowed developers to build on its functionality. Starting with version 2020.2, we offer a new way to write and integrate plugins for the user interface. To learn more, check out this talk from TeamCity Technology Day .

Sakura UI: the perfect combination of features and design

The new Build Queue page is stylish, works very fast, and makes it easy to find everything you need. It lets you quickly see the changes for every queued build, understand what triggered the build and where it will run, get the estimated time when it will start, and view all the other build information in a neat and convenient UI. You can select any builds that you don’t need and remove them from the queue, or alternatively, if there are builds that need to complete sooner, you can move them to the top of the list.

These are just some of the ways we're strengthening TeamCity. For the full list of changes in version 2020.2, please see the TeamCity documentation.