Book Image

TeamCity 7 Continuous Integration Essentials

By : Volodymyr Melymuka
Book Image

TeamCity 7 Continuous Integration Essentials

By: Volodymyr Melymuka

Overview of this book

<p>Nowadays, Agile application development is usually done at a fast pace when many developers are working on the same piece of code. Every so often, this becomes a real challenge if there&rsquo;s no permanent control over consistency of the project source. It is often impossible to force lazy and/or busy programmers to execute tests before and after each of their commits. Continuous Integration is a well-known life saver for distributed development environments with TeamCity being one of the best and easy-to-use instruments utilizing it. <br /><br />"TeamCity 7 Continuous Integration Essentials" is the first book of its kind showing in a sequential approach &mdash; how to start implementing Continuous Integration &mdash; over generic projects and enclosing rich features of the TeamCity as a project gradually evolves.<br /><br />Learn how to do a quick-start with TeamCity and suite most of the common needs right out of the box. As the project grows and more sophisticated requirements to the build process arise, the examples from this guide will assist you showing how to unleash TeamCity hidden powers and adjust advanced features to bring stability into the distributed development process.<br /><br />You will learn how to start a new Java project from scratch generating a working &ldquo;skeleton&rdquo; of web application using Apache Maven and later adding some business logic and writing certain tests. After that, you will know how to perform a swift attach of TeamCity facilities to your project and eventually change it into rich featured information source describing the current state of your venture. If you want to benefit from Continuous Integration and are considering using TeamCity then this book is for you.<br /><br />You will be acquainted with everything you need to know in order to apply Continuous Integration with TeamCity by installing it first, then turning on automatic supervision over project&rsquo;s reliability, and finally tuning up advanced settings in order to match your needs.</p>
Table of Contents (15 chapters)

Preface

Nowadays, Agile application development is usually done at a fast pace when many developers are working on the same piece of code. Every so often, this becomes a real challenge if there's no permanent control over consistency of the project source. It is often impossible to force lazy and/or busy programmers to execute tests before and after each of their commits. Continuous Integration is a well-known lifesaver for distributed development environments, with TeamCity being one of the best and easy-to-use instruments utilizing it.

TeamCity 7 Continuous Integration Essentials is the first book of its kind that shows, in a sequential approach, how to implement Continuous Integration over generic projects and also encloses rich features of TeamCity as the project gradually evolves.

Learn how to do a quick start with TeamCity and suit most of the common needs right out of the box. As the project grows and more sophisticated requirements for the build process arise, the examples from this guide will assist you, showing how to unleash TeamCity's hidden powers and adjust advanced features to bring stability to the distributed development process.

You will learn how to start a new Java project from scratch, generating a working "skeleton" of a web application using Apache Maven, and later adding some business logic and writing certain tests. After that, you will know how to perform a swift attach of TeamCity facilities to your project and eventually change it into a rich-featured information source describing the current state of your venture. If you want to be benefitted from Continuous Integration and are considering using TeamCity, then this book is for you.

You will be acquainted with everything you need to know in order to apply Continuous Integration with TeamCity by installing it first, then turning on automatic supervision over your project's reliability, and finally tuning up advanced settings in order to match your needs.

What this book covers

Chapter 1, Getting Started with TeamCity, provides a brief overview of what TeamCity is, and which features make it so special. We'll learn its basic terms and concepts, main architecture, and build lifecycle.

Chapter 2, Sample Project, shows how to prepare your development environment, create a basic web application with Apache Maven, and finally launch it.

Chapter 3, Preparing a Continuous Integration Environment, describes the installation and basic setup of the TeamCity server and build agent bundle.

Chapter 4, Configuring the TeamCity Server, deals with creating a build configuration for a given project, setting up an automatic build triggering, and configuring personal notifications for user.

Chapter 5, Integration with an IDE, looks at installation of TeamCity integration plugin into IntelliJ IDEA and Eclipse. Also it is shown how useful this plugin could be in your daily work.

Chapter 6, Enhanced Techniques, examines some advanced TeamCity features like remote run and creation of build chains with dependent multi-step builds.

Chapter 7, Advanced Configuration, covers an upgrading routine together with a backup and restore process. You'll know how to create users and groups, install and connect additional build agent, and assign to an agent a particular build configuration.

Appendix, Where to Go Next, gives you some references for obtaining additional information on TeamCity.

What you need for this book

To try examples from this book yourself, you will need the Java software development kit with a version equal to or greater than 1.6 installed on Windows, Linux, or Mac OS X machine. Also, some version control system is needed, which could be any of the ones currently in the market. The sample project will be built by Apache Maven with a version not older than 2. To write code, it would be good to use a modern IDE such as Eclipse or IntelliJ IDEA.

Who this book is for

This book is great for developers willing to start utilizing Continuous Integration on a daily basis and it does not really matter how experienced you are at your programming skills. You may not need to be a programmer at all in order to use all the advantages of TeamCity. Quality Assurance engineers would benefit from this book as there's enough information explaining how to maintain a build configuration for tests and administer the TeamCity server. Even project managers and other managerial staff who don't actually work with code will find use for TeamCity as they will be kept abreast of a project's current status.

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 are shown as follows: "Choose the home of the project as working directory and enter jetty:run".

A block of code is set as follows:

package com.packtpub;
public class Calculator {
    public int sum(int x, int y) {
        return x + y;
    }
    public int multiply(int x, int y) {
        return x + y;
    }
}

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

package com.packtpub;
public class Calculator {
    public int sum(int x, int y) {
        return x + y;
    }
    public int multiply(int x, int y) {
        return x + y;
    }
}

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

[root@host]# wget http://download-ln.jetbrains.com/teamcity/TeamCity-7.0.2.tar.gz

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: " At any time we can schedule a manual build by simply clicking on the Run button.".

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/support, 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.