Brian On Software

Because there is so much MORE to software development than 1’s and 0’s…

Subscribe in a readerSubscribe in a reader Subscribe via emailSubscribe via email

Blessed be the God and Father of our Lord Jesus Christ! According to his great mercy, he has caused us to be born again to a living hope through the resurrection of Jesus Christ from the dead, to an inheritance that is imperishable, undefiled, and unfading, kept in heaven for you, who by God's power are being guarded through faith for a salvation ready to be revealed in the last time. (1 Peter 1:3-5, NIV)

Mar
17
2008

Setting Up a Continuous Integration Environment (Preface)

In the course of the next few weeks, I’ll be writing a series of articles on how to set up a Continuous Integration (CI) environment for .NET development using TeamCity as the build integration server (with MySQL as the backend database), Subversion as the version-control server, MSBuild as the software build engine, NUnit as the unit testing framework, NCover as the tests coverage tool, NDepend as the static code analysis tool, and other tools that might give us important feedback on a build.  I hope that this series will be helpful in better managing and communicating your open source projects, academic projects and commercial projects.  Even though that I’m targeting development with .NET, the principles can faithfully be applied in a CI environment which uses different tools than the ones mentioned above.

You might be wondering why I won’t be using CruiseControl.NET as the build integration server.  The answer is pretty simple.  First of all, there are many articles that already describe very well how to install, configure and properly use CruiseControl.NET as a build integration server.  Second of all, I believe that CruiseControl.NET is dead in terms of ongoing development.  I’m not saying that CC.NET isn’t good at all, on the contrary, but the fact that it wasn’t updated in almost a year tells me that it’s probably stalling.  At the present moment, TeamCity is by far the best build integration server out there in terms of features, extensibility, performance, portability and scalability.  Thanks to its open discussion forums, newsgroups and accessible JIRA tracking dashboard, JetBrains is in a good position to redefine the principles behind CI and, most importantly, to further innovate in the CI space.  Another thing you might be wondering is how much setting up this kind of CI environment is going to cost you.  That answer is also very simple.  It’ll cost you a little learning curve to know how to properly use the tools and also some time in properly configuring the tools.  In other words, setting this kind of CI environment will cost you absolutely nothing in terms of financial expenses, except maybe buying a machine to act as a remote server to run your builds.  In fact, since the release of TeamCity 3.1, the Professional Edition is free to use (refer to this post for more information).  I’ll go more into the details of each tool in the later posts in order to separate the concerns and keep this series as loosely coupled as possible so that you can refer to each specific part individually.  I guess the principles of object-oriented programming follow us in everything we do in life…

I will not cover the whole concept, principles and best practices of Continuous Integration because other people have already done an excellent job in doing that.  I highly recommend you to look at Martin Fowler’s article on Continuous Integration, as well as to get a hold of Paul Duvall’s excellent book on Continuous Integration (from the Martin Fowler Signature Series of Addison-Wesley) to further understand some key patterns, best practices and strategies to successfully deploy and use a CI environment.  I read the entire book before setting up a CI environment at a client side, and I’m glad I did because the material that Paul covers in his book are real-world scenarios that most people face when setting up this kind of an ecosystem inside an organization. 

On a last note, it is important to know that I’m setting up this kind of infrastructure in a Windows environment.  Written in Java, TeamCity can be installed and executed on any platform that supports the JVM, such as Mac OS X, Linux, Windows, etc.  Subversion can also be installed and executed under Mac OS X, Linux and Windows.  As for the supporting build tools like NUnit and NCover, these only work under Windows.  I really hope that other people will write about setting up this kind of environment in other platforms than Windows to help out those that use different systems.  I’ll also update the information related to this series to reflect changes to the way we use the tools, new strategies to consider and the feedback I’ll receive from these articles.  Another point to consider is that you might want to try out this kind of CI setup in a virtual environment with various virtual machines.  The following approach might give you a general idea how you could implement a solid CI environment:

 

 

Here’s an early overview of the activities that will be covered in this series:

kick it on DotNetKicks.com

Similar posts you might be interested in reading:

6 Responses to “Setting Up a Continuous Integration Environment (Preface)”

  1. Williams Says:

    Hi
    Cruisecontrol.Net is not dead, there are a lot of changes done recently.
    Soon the 1.4 release will be ready, with a lot of enhancements,
    check the url below for the changes from 1.3 to 1.4
    1.3 is +/- 7 months old

    http://jira.public.thoughtworks.org/browse/CCNET?report=com.atlassian.jira.plugin.system.project:roadmap-panel

  2. Brian Di Croce Says:

    Williams, thanks for the update on CC.NET. I’m excited to know that the development is still active. I’ll give it a try for sure when v1.4 comes out and see how it compares with TC v3.1.

  3. Slava Imeshev Says:

    Brian,

    Have a look at our Parabuild, too. It takes Continuous Integration one step further and provides practically unbreakable nightly and daily builds: http://www.viewtier.com/products/parabuild.htm

  4. Brian Di Croce Says:

    Slava,
    We were actually evaluating both Parabuild and TeamCity. The reason we decided to go with TC, version 2.11 at the time, was that it allowed developers to run the personal build in a ’sandbox’ before actually committing their changes to the trunk/repository. But you’re right, and I’m glad you pointed it out, Parabuild is also another serious contender to consider when evaluating CI tools. I’ll no doubt check it out next time we’ll have to implement a CI environment. Thanks for providing the link!

  5. Loosely Coupled Human Code Factory - A.K.A. Mercenary Engineer : Team City Continuous Integration Build Server and VS.NET VCS Integration Says:

    [...] Setting Up a Continuous Integration Environment (Preface) - Brian on Software [...]

  6. Hieu Le Trung Says:

    If you have chance, try the Hudson. It’s look good. ;)

Leave a Reply