Features Learning Courses Newsletter Tutorials

The New TeamCity Video Tutorials

Have you ever been looking for easy-to-consume educational materials on TeamCity?

The brand new TeamCity video tutorial series is out! The tutorials provide simple, concise, and very hands-on explanations of the key TeamCity concepts.

These tutorials are meant both for those just starting out with TeamCity as well as those looking to take their skills a step further. Regardless of how much experience you have, we hope these videos will help you and your team learn something new and achieve a more efficient CI/CD process with TeamCity.

Watch the full playlist for the explanations of the key concepts of TeamCity, or browse through the separate videos below.

Watch the full playlist

Here is a breakdown of what’s included in the series.

Key general concepts

Running command line steps

Running command line scripts can be automated with TeamCity. In this episode, we go over setting up a project in TeamCity, connecting your GitHub repo and creating a single build configuration with a command line build step. In this example, our script runs Maven clean package for one of the microservices and then deploys the resulting artifact (a .jar file) to an AWS S3 bucket.

We also touch on adding a password parameter environment variable to propagate artifacts to an AWS S3 bucket using the access key credentials.

Using specific runners

If you only use the command line runners in TeamCity, you might be missing out on some of the powerful features that would improve your overall CI/CD experience.

This tutorial goes over splitting your command line step into separate ones, and using the dedicated Maven build runner to execute the maven clean package command. It dives deep into multiple settings and advanced configuration options, touches upon running the builds in Docker, and shows how to add code coverage reports to your builds.

Working with artifacts

Producing artifacts and propagating them is an essential part of any CI/CD pipeline. Our example build produces several artifacts such as an application log and Selenium screen recordings. How do you get that uploaded as part of your CI/CD build in TeamCity?

This video touches upon configuring a build to produce and upload artifacts, running the build and then downloading the artifacts via the TeamCity interface.

Artifact rules

Artifact rules in TeamCity can be tricky. But they are also a powerful tool that lets you get the most out of working with artifacts in your CI/CD pipeline.

TeamCity artifact rules give you the flexibility to organize the artifacts into an optimal structure that fits your project requirements. TeamCity then conveniently presents the artifacts within the user interface, displaying the full structure of the folders, subfolders, and files.

Using SSH during builds

Connecting to remote machines via SSH can be an important part of your CI/CD process. This tutorial shows an example of a deployment job which requires connecting to a target machine via an SSH and running a deployment script there.

Learn how to make an SSH Exec build step a part of your build configurations, and how to upload an SSH key in TeamCity to pass it to the build agents.

Integrations

Integrating with GitHub

There are multiple ways to integrate TeamCity and GitHub. In this tutorial, we go over three most important use cases:

  • Using the Commit Status Publisher to post the results of your builds in TeamCity back to GitHub;
  • The Pull Request build feature which allows you to automatically build the incoming GitHub pull requests;
  • The integration with the GitHub issue tracker, to be able to reference issues in your commit messages and have them be clickable in TeamCity.

Sending build statuses to GitHub/Jira

How do you send your CI/CD jobs status to a third-party platform, such as your GitHub repo?

In this video, see how using the Commit Status Publisher build feature in TeamCity can help you report your TeamCity build results back to GitHub.

TeamCity and Slack

Getting timely and precise feedback about your CI builds is crucial to the efficiency of your CI/CD pipelines and to how quickly you can react to the errors caused by your changes. Slack is a great medium for such notifications.

This tutorial shows how to send your TeamCity build statuses to Slack. Learn how to connect your TeamCity and Slack instances, and which additional configuration options there are to get the most out of this integration.

TeamCity and Jira (Cloud)

Integrate TeamCity and Jira for a smoother and shorter feedback loop between your issues, commits, and CI/CD jobs.

This tutorial goes over integrating TeamCity with Jira Cloud for two things:

  • Being able to reference Jira task IDs in your commit messages and see them as hyperlinks in TeamCity;
  • Having TeamCity build statuses (success/fail) visible and clickable in your JIRA tasks.

Source code repositories

SSH checkout

How do you create a TeamCity project from an SSH repository? In this very simple tutorial, see how uploading an SSH key works in TeamCity, and how to connect a GitHub repository via SSH.

Using GitHub commit hooks

Commit hooks allow you to trigger your CI/CD jobs faster and with less performance overhead. This tutorial goes over configuring your TeamCity server to use commit hooks. We also touch upon a smart safety mechanism built into TeamCity for the cases when commit hooks fail!

Working with feature branches:

How do you configure all of your feature branches to be built, on top of your trunk/master branch? Being able to let your CI/CD tool know which branches to build and which to ignore is a powerful concept, as it allows more granular control over your CI/CD pipelines.

TeamCity allows for very flexible branch configs in your build settings. This tutorial explains how to get the most out of it by utilizing the syntax in that branch specification field.

Building pull requests

How do you configure your CI/CD jobs to build pull requests? The Pull Requests build feature in TeamCity makes it possible to automatically detect and build pull and merge requests from GitHub, GitLab, Bitbucket, and Azure DevOps.

In this tutorial, we go over configuring this for GitHub, and show the feature in action by creating a pull request and having it built by TeamCity.

Checkout rules vs. trigger rules

What’s the difference between checkout rules and trigger rules in TeamCity? Both are powerful tools to make sure your CI/CD pipeline only works with specific directories and files from your version control, and only trigger the builds for the changes in the relevant parts of it.

And although both trigger rules and checkout rules allow you to achieve that, there are innate differences in how they work.

Build agents

Agent requirements

Being able to choose a specific build agent type to run your CI/CD jobs is a powerful way to control some of the key characteristics of your builds: how quickly they run, how much memory or compute power they have available, which OS they will run on, etc.

In this video, see how to view and define specific requirements for the build agents to run your builds in TeamCity.

Connecting local agents to a TeamCity (Cloud) server

Sometimes even in a cloud CI/CD setup you need to be able to run some jobs on a self-hosted machine. How do you connect a local build agent to your CI/CD server?

In this tutorial, we go over installing a TeamCity build agent locally and connecting it to a TeamCity Cloud instance. Simple and straightforward.

Tests and build chains

Using the test report page

The ability to run automated tests is an essential part of any CI/CD tool.

TeamCity can detect tests in your projects automatically and show you the results of each test run associated with a build. It also knows the full history of each test, across multiple projects, and thus makes it easy to see which builds and which changes cause them to fail. Analyzing a test’s history, TeamCity will automatically detect if a test is flaky and display that in the UI.

This tutorial provides an overview of the test-related functionality in TeamCity.

Creating your first build pipeline (build chain)

Build pipelines are a centerpiece of any CI/CD process. TeamCity’s take on build pipelines are build chains, which allow you to set up the order of builds via setting up dependencies between them. This allows for a more versatile approach to pipelines which can save you build time and optimize build resources.

This tutorial goes over splitting a simple build configuration in two, connecting them via both snapshot and artifact dependencies, and running the build chain.

Kotlin DSL

Creating a build pipeline for a microservices app

Ever wondered if there’s any best practices when it comes to structuring your microservice projects with the help of Kotlin DSL? Then take a look at this episode, where we’re going through three different approaches to do just that.

In the end, we will build a CI/CD pipeline for a microservices project and run it in TeamCity.

Also, see this playlist for the full Kotlin DSL tutorial series:

If you find this TeamCity tutorial helpful, there are two things we recommend you do: 1. share it with a colleague or a friend who you think might find it useful, and 2. give a shout out to Marco for putting it together :)

More importantly, please do let us know if there is a topic or a concept we’ve missed that you’d like to see added to this tutorial. We’d love to hear your feedback!

Watch the full TeamCity tutorials playlist

Happy learning and happy building!

Discover more