Book Image

Learning Continuous Integration with TeamCity

Book Image

Learning Continuous Integration with TeamCity

Overview of this book

Table of Contents (19 chapters)
Learning Continuous Integration with TeamCity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Continuous Integration (CI) has become mainstream in software development. Accordingly, the number of CI tools has increased as well. TeamCity by JetBrains is one of the leading CI tools available today, and it is suitable for small teams, large enterprises, and everyone in between. Being a flexible and feature-rich tool, it is also necessary to understand which features should be used, and which shouldn't, based on the specific context.

Learning Continuous Integration with TeamCity is a comprehensive guide to get started with CI, TeamCity, or both. With the goal of understanding CI and its benefits and utilizing TeamCity to realize the said benefits, the book uses sample projects and examples to explain how to set up CI. The projects are from the major tech stacks such as Java, .NET, Ruby, Python, Android, iOS, and more. The chapters also discuss the myriad tools in each of these ecosystems that are essential for a beneficial CI setup.

Every aspect of CI, the processes, tools, and the collaboration amongst the people is covered in terms of features offered by TeamCity. The book also takes a look at what's beyond CI—Continuous Delivery (CD)—and how TeamCity fares in setting up a fully functional CD setup.

What this book covers

Chapter 1, Introduction, discusses CI and its basic practices. The idea is to be on the same page when we discuss CI in the rest of the book and when implementing various solutions using TeamCity as a CI server. This chapter will also provide a high-level introduction to TeamCity, its features, and how it compares with competing products, such as Jenkins and ThoughtWorks's Go.

Chapter 2, Installation, discusses the installation of TeamCity, the server, and the agent. The aim of this chapter is to get started with a basic installation of TeamCity that can be used to configure and run the builds in the upcoming chapters.

Chapter 3, Getting Your CI Up and Running, comes up with a complete CI setup. We will start with a brief introduction to version control systems and the important role they play in CI. We will then pick up a sample project and set up CI for it. After getting a fully functional CI setup, we will explore some fine-tuning options that we have at our disposal. In the process, we will learn about the TeamCity terms, features, and concepts involved.

Chapter 4, TeamCity for Java Projects, covers the specific features that TeamCity provides for setting up CI for Java projects.

Chapter 5, TeamCity for .NET Projects, introduces the various tools present in the .NET ecosystem and also TeamCity's integrations with these tools.

Chapter 6, TeamCity for Ruby Projects, explains the various tools involved in setting up CI for Ruby projects. We will be covering RVM, rbenv, bundler, rake, and RSpec. We will also look at how these tools come together and integrate with features provided by TeamCity.

Chapter 7, TeamCity for Mobile and Other Technologies, explains how TeamCity fares when it comes to mobile projects, specifically Android and iOS projects. We will also look at some plugins for TeamCity and how they extend TeamCity to provide first-class support for even more platforms such as Node.js.

Chapter 8, Integration with Other Tools, teaches how TeamCity provides integrations with various tools, with the aim of making CI and interacting with TeamCity, a seamless experience.

Chapter 9, TeamCity for a Member of the Team, discusses how a user of TeamCity can take advantage of the features provided by the web interface of TeamCity to achieve various tasks that are expected of them in a CI setup.

Chapter 10, Taking It a Level Up, explains some of the more advanced concepts in TeamCity. These concepts can improve the entire setup of TeamCity and aid in moving towards a better CI setup.

Chapter 11, Beyond CI – Continuous Delivery, teaches us to expand on the concept and explores how a CD setup can be achieved using TeamCity. First, we begin by looking at what CD is and why it is beneficial. Then, we look at how the Deployment Pipeline can be configured in TeamCity so as to achieve these benefits of CD.

Chapter 12, Making It Production Ready, explains some of the steps needed to make our TeamCity installation ready for the real world.

What you need for this book

Depending on the tech stack/platform being used, a Windows/OS X/Linux based computer may be required.

For Java, a recent version of JDK 1.7 might be required. The .NET framework 4.0 will be needed for the .NET chapter.

Much of the installation of various tools and frameworks, including TeamCity, is covered in the book.

Who this book is for

Learning Continuous Integration with TeamCity is intended for teams and organizations comprising developers, testers, and operations and Devops, who are trying to start practicing CI, start using TeamCity, or both. If you have thought about bringing CI in to your team, if you are already using a CI tool and want to move to TeamCity, or if you are looking for ideal practices and techniques while implementing CI with TeamCity, this book is for you.

Since the book covers all major platforms/languages, such as Java, .Net, Ruby, Python, and even mobile, your project is most likely covered in the book.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "An init script can be added and enabled for the agent, similar to the one for the server, in order to run it as a daemon."

A block of code is set as follows:

cover => coverage
nosetests.xml

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.stacktoheap.maven_ci_example</groupId>
  <artifactId>maven_ci_example</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>maven_ci_example</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

Any command-line input or output is written as follows:

wget http://www.trieuvan.com/apache/ant/binaries/apache-ant-1.9.3-bin.tar.gz
tar xvfz apache-ant-1.9.3-bin.tar.gz
export ANT_HOME="~/Downloads/apache-ant-1.9.3"
export PATH="$PATH:$ANT_HOME/bin"

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "If you choose to install the agent, next comes the Configure Build Agent Properties screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.