TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Continuous Integration with TeamCity

Last modified: 20 April 2023

What is Continuous Integration?



Continuous Integration is a software development practice in which developers commit code changes into a shared repository several times a day. Each commit is followed by an automated build to ensure that new changes integrate well into the existing code base and to detect problems early. To learn more about continuous integration basics, please refer to Martin Fowlers article.

What is TeamCity?



JetBrains TeamCity is a user-friendly continuous integration (CI) server for developers and build engineers free of charge with the Professional Server License and easy to set up!

What can you do with TeamCity?



  • Run parallel builds simultaneously on different platforms and environments

  • Optimize the code integration cycle and be sure you never get broken code in the repository

  • Review on-the-fly test results reporting with intelligent tests re-ordering

  • Run code coverage and duplicates finder for Java and .NET

  • Customize statistics on build duration, success rate, code quality, and custom metrics

  • and much more.

To learn more about major TeamCity features, refer to the official JetBrains site. The complete list of supported platforms and environments can be found here.

Basic TeamCity concepts



This section explains the main concepts. The complete list can be found here.

The TeamCity build system comprises the server and Build Agents.

Basic CI Workflow in TeamCity



To understand the data flow between the server and the agents, what is passed to the agents, how and when TeamCity gets the results, let's take a look at a simple build lifecycle.

    1. The TeamCity server detects a change in your VCS Root and stores it in the database.

    2. The build trigger sees the change in the database and adds a build to the queue.

    3. The server finds an idle compatible build agent and assigns the queued build to this agent.

    4. The agent executes the Build Steps. While the build steps are being executed, the build agent reports the build progress to the TeamCity server sending all the log messages, test reports, code coverage results, etc. to the server on the fly, so you can monitor the build process in real time.

    5. After finishing the build, the build agent sends Build Artifacts to the server.

Now you can proceed with TeamCity installation.