TeamCity & GitLab Continuous Integration

Flexible and adaptable to any workflow, TeamCity offers powerful CI tooling with top-notch integration support for GitLab.com, GitLab Enterprise Edition, and GitLab Community Edition.

Build at scale where others fail

As projects grow in size and complexity, it becomes increasingly difficult to maintain an efficient delivery process using only GitLab’s built-in CI capabilities. This is where TeamCity comes to save the day! TeamCity is a general-purpose CI/CD solution that doesn’t enforce any specific workflow and provides maximum flexibility and configurability for teams of all sizes.

Multiplatform, multicloud, multilanguage

TeamCity is available for Linux, Windows, and macOS and can be run on your own hardware, on your preferred cloud-hosted infrastructure, in a Kubernetes cluster, or on any combination thereof. It supports all programming languages and integrates with all popular tools used for building and testing software.

Get actionable feedback

TeamCity delivers valuable, actionable feedback on build and test failures to help make your development process much more efficient. It notifies you of failed tests in real time, keeps their build history, logs their duration, and marks unstable tests as flaky. Each test may include stack traces, screenshots, logs, and other data necessary for quick investigation.

Support for any workflow

Setting up continuous integration for your GitLab projects couldn’t be simpler. Once you’ve configured a connection to your GitLab repositories, a new TeamCity project takes just a few clicks to create. No matter how you organize your projects and workflows, TeamCity can build it.

  • Run builds and unit tests on each commit for immediate feedback on your changes.
  • Create personalized workflows based on username, branch name, commit message, or file changes.
  • Trigger builds when a merge request is opened to run automated tests before a code review.
  • Schedule nightly builds to run a full suite of regression tests and keep code quality high.
  • Automate a full set of builds and tests when changes are merged to a release branch.
  • Initiate a dependent project build when a related build completes successfully.

You can use TeamCity to combine different programming languages, platforms, and build infrastructures into a single, robust CI pipeline. You can even add multiple VCS roots to create build pipelines for projects with repos hosted both in GitLab and other version control systems, including GitHub, Bitbucket, Azure DevOps, Mercurial, Subversion, and Perforce. Read more about VCS integrations.

Post-build automation

With full support for GitLab’s features, TeamCity integrates seamlessly and transparently, providing you with a comprehensive view of your DevOps processes.

Build status publishing

TeamCity can publish the current status of each build to GitLab in real time – from the moment it is added to the queue to completion – so you can monitor progress and view results directly from the commit or merge request.

For more details, see the Commit Status Publisher section of our documentation.

Automated and manual merging

You can configure rules to merge changes to a branch automatically as part of the CI pipeline. With support for cascading merges, you can create sophisticated workflows to promote changes to protected integration and release branches. In the event any tests fail or other auto-merge conditions aren’t met, you can still choose to merge changes manually directly from the TeamCity UI, without having to return to GitLab.

For more details, see the Automatic Merge and Manual Branch Merging sections of our documentation.

VCS labeling

TeamCity makes it easy to set Git tags to record version numbers against the sources of successful builds (or all builds) automatically or manually.

For more details, see the VCS Labeling section of our documentation.

Issue tracker integration

You can view details of any GitLab issues referenced in commit messages directly inside the TeamCity UI.

For more details, see the Integrating TeamCity with Issue Tracker section of our documentation.

Instant notifications

Notify commit authors and team members of broken builds or failing tests, celebrate successful test runs, or inform code reviewers when continuous integration checks have been completed and changes are ready for review. TeamCity offers native support for Slack, email, and IDE and browser notifications, while the rich plugin ecosystem provides additional support for Microsoft Teams, Telegram, and Discord notifications.

Streamlined authentication

Whether using TeamCity Cloud or TeamCity On-Premises, you can use your existing GitLab.com or GitLab CE/EE account to provide identity and access management.

  • Allow users to sign in to TeamCity with their existing GitLab credentials.
  • With build and test results published to GitLab automatically, you can choose whether to allow all of your GitLab users to access TeamCity, or restrict access to a subset of your users responsible for configuring build pipelines.
  • Map existing TeamCity users to GitLab profiles.
  • Configure user permissions in TeamCity independently of GitLab roles.

Powerful TeamCity features to complement your workflow

Real-time test intelligence

When builds and tests fail, understanding the nature of the issue and identifying the root of the problem is the top priority. TeamCity can:

  • Identify the exact commit that introduced a failure, notify the author of the change, and assign investigations automatically.
  • Analyze your test history to identify failures fixed in subsequent builds and pinpoint flaky tests.
  • Use inspections from IntelliJ IDEA or ReSharper to provide results of static code analysis as part of your build pipeline.
  • Measure the extent of your automated test coverage with native support for Java and .NET tools and integrations for many other build runners, including Ant, Maven, and Python.

CI optimizations

Short, quick feedback loops are critical to an effective DevOps strategy. TeamCity streamlines build and test workflows to quickly deliver insights into your latest changes, accelerating your release process and giving you more time to investigate and address any issues.

  • Build steps are optimized by default to re-use unchanged build artifacts.
  • TeamCity automatically identifies the fastest build agents and the most efficient task ordering, leading to considerable savings of computing resources and time for large projects.
  • Get feedback faster by distributing automated tests across multiple agents with automatic parallelization.
  • Test results are reported in real time, so you can start investigating failures even before the build step completes.

FAQ: Continuous Integration with TeamCity and GitLab

Is TeamCity’s integration with GitLab a free feature?

Integration with GitLab is available in all TeamCity versions, including the free self-hosted version. You can also try it for free in TeamCity Cloud which comes with a 14-day trial period.

Is TeamCity better than GitLab?

It is not accurate to compare TeamCity and GitLab because they are different types of tools. TeamCity provides more features and flexibility than the built-in CI/CD capabilities of GitLab, but it doesn’t have features like issue tracking or Git hosting.

Does TeamCity support GitLab Container Registry?

Yes, TeamCity supports all popular Docker registries, including GitLab Container Registry. In addition to common pull and run operations, TeamCity can also automatically remove outdated Docker images during server cleanup, which is particularly useful in on-premises CI/CD setups.

Learn more about TeamCity’s Docker integration.

Can you build your code in TeamCity without committing it to GitLab?

By installing the TeamCity plugin to an IntelliJ-based IDE or Visual Studio, you can run a CI pipeline on your code without committing it. This feature is particularly loved by game developers.