TeamCity’s Version Control System Integrations

Version control is at the very core of any CI/CD pipeline, which is why TeamCity integrates with every leading version control system (and several others) right out of the box. Whether your code is stored in Git, Mercurial, Perforce, Subversion, Team Foundation (TFVC), or a combination of version control systems, you can use TeamCity to create flexible, powerful workflows to build, test, and deploy your software automatically.

Get one CI to build them all

Does your code live in a monorepo or is it distributed across multiple version control systems of different types? Are your repositories hosted in the cloud or do you keep everything in-house? Whichever local and hosted VCS systems you use, TeamCity can build your apps efficiently.

Boost your productivity

TeamCity supports every imaginable development workflow and allows you to build exactly what you need, when you need it. You can build every pull request, run the pipeline when someone commits to a specific branch, trigger a build when a specific user changes files in a specific directory, and much more.

Don’t reinvent the wheel

Have you wanted to test new code in a CI system without committing it, automatically merge “green” pull requests, or tag Git commits that belong to release versions of your app? Stop writing your own scripts to automate VCS-related routines – TeamCity supports all of these scenarios out of the box!

Support for industry standards

TeamCity integrates with all major version control systems and VCS hosting services used in modern software development.

VCS types

  • Azure DevOps (TFVC)
  • Subversion
  • CVS, and others

TeamCity provides a common approach for working with all types of repositories and code storage services so you can focus on creating great apps instead of figuring out the specifics of each particular service.

Core TeamCity Features for VCS Integration

Multi-VCS support

Combining code stored in multiple version control systems is not uncommon. Perhaps you’re working with a legacy codebase, different parts of your system benefit from different source control features, or you’re in the process of migrating from one VCS to another. Whatever the reason, TeamCity can take source code from any number of repositories across multiple version control systems and create a single build.

Adaptable build triggers

Most CI/CD pipelines involve multiple stages, from initial checks for a developer’s personal branch to a full suite of regression tests when merging to main before a release candidate can be tagged.

With TeamCity, you can configure multiple build chains with different triggers within a single project. Control how build resources are used by defining triggers based on commit author, branch name, pull request, or files changed (among others) or use commit hooks to monitor repos for changes.

Status reporting for commits and pull requests

For the best developer experience, configure TeamCity to run seamlessly in the background, monitoring your repos for changes, triggering builds, and reporting the outcome in the context of your VCS hosting system. Use the commit status publisher to report the progress of builds in real time and to view build and test results directly from GitHub, GitLab, Bitbucket, or Azure DevOps.

Automatic merging of changes

Automatic merging offers multiple benefits if you’re developing changes in feature branches with Git or Mercurial. Keep feature branches updated and minimize conflicts by regularly merging changes from the main branch. Once changes are ready, merge changes from a feature branch to the main branch automatically, subject to defined conditions (such as successful builds).

Issue tracker integration

Whether you’re debugging failing tests or updating release notes, viewing the details of issues referenced in commit messages is invaluable. TeamCity integrates with issue trackers provided by VCS hosting platforms and standalone issue management tools to provide contextual issue information in the TeamCity UI and convert issue IDs to direct links.

User authentication with SSO

Using the right tools for the job shouldn’t create administrative overhead. TeamCity supports user authentication with single sign-on via your VCS hosting service, providing a seamless experience for users and streamlining IT tasks for administrators.

Software development workflows are as varied as the people who build them. Monorepo vs polyrepo; feature branches, release branches, or pull requests; cloud-hosted and on-premise servers in different geographic and regulatory regions; test suites run in series or in parallel; polling limits for cloud-hosted platforms and access constraints – the list goes on and on. Whichever process you follow and platforms you use, with TeamCity’s intuitive UI you can build a CI/CD pipeline that suits your needs while saving your configuration as code.

FAQ: TeamCity’s CI/CD Integration with VCS

Can TeamCity build code distributed across multiple VCSs?

TeamCity can build projects that have their source code stored in Git, Perforce, Mercurial, SVN, and other repositories, including cloud hosting solutions.

Does TeamCity support pull and merge requests?

TeamCity supports pull requests and merge requests in GitHub, GitLab, Azure DevOps, and Bitbucket Server. It also has a Perforce shelve trigger to process changes in shelved files of Perforce changelists.

Are TeamCity’s VCS integrations free or paid features?

All VCS integrations are available in all versions of TeamCity, including the free self-hosted version. TeamCity Cloud offers a free 14-day trial period.

Can I build my code in TeamCity without committing it to a VCS?

TeamCity has IDE plugins for IntelliJ-based IDEs and Visual Studio that allow you to build your code without committing it. This is particularly useful if your entire development takes place in one single branch, which is often the case in game development, for example.