Subverting TeamCity

Every development environment I’ve worked on during the last few years used Cruise Control and Microsoft Visual Source Safe as a combination for source control and continuous build integration.  I’ve yet to come across a team actually using Microsoft’s Team Foundation Server.  I’m assuming the teams I’ve worked on weren’t large enough to warrant usage of this all encompassing tool.

What I have encountered is much criticism about Source Safe.  For years I’ve heard there are better source control alternatives, Subversion for instance.  This weekend I decided to give an alternate environment a chance and change my home build environment around.  I setup Subversion as my source code repository, and just for a change decided to use Jetbrain’s TeamCity product for continuous build integration.  Cruise Control has been fine, but why not see what else is out there?

Getting Subversion setup was an interesting experience.  I’m not used to tools that don’t have more of a front end to them.  Subversion comes with a command line client, but if you want anything visual you have to go get a thrid party tool.  There are tools that are free, and others that aren’t.  I choose Tortoise SVN, as it was free and there seemed to be some good things written about it.  It’s a windows shell extension so you have to access it throug windows explorer, which was a little funky but I got used to it.

Next I needed a way to integrate into Visual Studio.  A little googling and I found Ankh SVN, a Visual Studio plugin for Subversion that’s open source.  Once I installed Ankh SVN the only problem I had left was figuring out how to connect to my Subversion repository on a remote machine.  Apparently you can use Apache to setup http, or you can use file based connections.  There is also a third way, using the svn protocol.   After some trial and error I realize I could use svn://buildmachine/repository to actually hit Subversion from a remote machine on the same network.  No apache needed with this setup, which I liked.  Just needed a user and repository to continue forward.

Once I figured out how to create a user and repository in Subversion I was ready to take my next step and get TeamCity up and running.  TeamCity turned out to be pretty straightforward.  It plugs right into subversion and you can use Nant or MSbuild for build scripting so if you’ve used Cruise Control you’re all set here.

The only confusion I ran into was how to configure the TeamCity NUnit launcher.  After googling around I realized you had to create a property in TeamCity build properties telling TeamCity what version of NUnit you are using.  Once I got around that hurdle I had a project or two setup on my dev machine using Subversion and TeamCity.

TeamCity seems a little easier to use and more straightforward than CruiseControl, we’ll see how long that feeling lasts.  I’ve read a lot of great things about Subversion, at least as compared against Source Safe, so I’m really interested to see how this plays out.

Leave a Reply

Your email address will not be published. Required fields are marked *