Skip to content
David Cumps
Building a Continuous Integration Build Server

Building a Continuous Integration Build Server

Originally published on my old blog at cumps.be on March 21, 2009.

After my previous series of posts about Design Patterns, I’m planning to tackle a new subject over the course of the following articles. We’ll have a look at how to build a Continuous Integration build server from scratch.

I’ve recently dusted off an old desktop and decided to convert it to my personal build and backup server. First things first, I won’t cover the initial steps in much detail as they are basic to building any server. I’ll just list my starting point so you can compare.

  • Windows Server 2008 Standard.
  • IIS 7.
  • SQL Server 2008 (this is solely because I will be running integration tests against a database).

First of all, we need a place to store our source code. I’m going to use Subversion for this, since I don’t have any MSDN subscriptions lying around to install Team Foundation Server at home. (Anyone with free MSDN vouchers lying around, hint :p)

Update: the 1-Click Setup turned out to be outdated, so install the latest Subversion as described in Upgrading Subversion, and install the latest TortoiseSVN separately. After installing SVN, continue below with configuring your firewall and setting up your first project.

Original instructions (outdated)
Start by downloading Svn 1-Click Setup and running the installer. I skipped the TortoiseSVN step since I already had it installed. You can install it, or get it from tortoisesvn.tigris.org and install it manually afterwards.

After installing SVN, open up the Windows Firewall Configuration and add an inbound rule for TCP port 3690 to allow clients to connect using the svn:// protocol.

Find a file called passwd in the repo directory that you created during the installation and add yourself as a user, for example:

[users]
david=mysuperpassword

On another machine, or locally if you want, right click somewhere in Explorer and select “TortoiseSVN - Repo-browser”. Enter svn://servername as a URL and press OK. This should show you your server with one project in it. I deleted this project to end up with an empty repository.

Decide which directory will be your main working directory on your machine, right click inside it and select “SVN Checkout”. The default options should be all right; press OK and it will fetch your empty repository. At this point you can create new directories below this folder and simply right click and select “SVN Commit” to store them on your build server.

That’s the first step towards a build server: you can now already start coding and safely store your code in a source control system, where you can easily go back to different versions and branch and merge code. Have a look at the SVN Book if you want to learn to unlock the full power of Subversion.

Even when you don’t follow any other steps in this series, setting up a repository on another machine would be a best practice in my eyes, and will make you sleep in peace at night :)

You May Also Like