2 min read

TeamCity is one of the most prominent tools used by DevOps professionals to perform continuous integration and delivery, effectively. It plays an important role when it comes to Mobile-level DevOps implementation. In this article, we will see how to create a TeamCity Project.

This article is an excerpt from the book, Mobile DevOps,  written by Rohin Tak and Jhalak Modi.

Once the installation is done, the TeamCity web user interface will open in the browser and we can create a new TeamCity project there. To do so, follow these steps:

  1. Once you have logged in to TeamCity UI, click on Create project:
TeamCity UI
  1. To connect to our project from GitHub, click on From GitHub on the next screen:
  1. This will open a popup with instructions to add a TeamCity application to your GitHub account:
Add connection
  1. Click on the register TeamCity link and it should take you to the GitHub page where you can register a new OAuth app.
  2. Give the details of the application, homepage URL, and callback URL, as shown in the following screenshot, and register the OAuth app:
OAuth application
  1. Once you register, on the next screen you’ll get a Client ID and Client Secret; copy those details since they will be required for the TeamCity project:
TeamCity
  1. Go back to TeamCity, put the Client ID and Client Secret in the required fields, and click Save:
Add connection
  1. Next, you need to do a one-time sign in to allow TeamCity to use GitHub repositories. Click on Sign in to GitHub:
TeamCity
  1. Authorize the TeamCity app to use GitHub by clicking on Authorize app:
Authorize TeamCity App
  1. Once authorized, select the PhoneCallApp repository from the list of repositories shown on TeamCity:
TeamCity
  1. On the next screen, TeamCity will offer to create a new project from the URL selected. Give it a name and click Proceed:
Create project url
  1. This should create two things. The first is a trigger in TeamCity for each code check-in you do; each will trigger a build. The second is a build step from the repository automatically:
Build
  1. We need to configure the build steps manually and use the build scripts described in the Creating a build script section. Use those scripts, described sequentially in previous steps, to create the build steps in TeamCity.
  2. Finally, your build steps should look like the following screenshot, consisting of all the steps mentioned in the Creating a build script section:
Creating a build script section
  1. Now, your TeamCity continuous build is ready, and a trigger is already configured to perform this build on each code check-in, or whenever it finds any code changes in the repository. This finally provides you with an Android package that is ready to be distributed.

To summarize, we created a TeamCity project for Mobile DevOps. If you found this post useful, do check out the book Mobile DevOps, to continuously improve your application development lifecycle.

Read Next:

Introduction to TeamCity

Getting Started with TeamCity

Jenkins 2.0: The impetus for DevOps Movement

LEAVE A REPLY

Please enter your comment!
Please enter your name here