TeamCity – Late adoption

TeamCity is a build server put out by the wonderful JetBrains team, possibly best know in the .Net community for ReSharper.
TeamCity is a builder that basically take on the likes on CC.Net but aims to make the process a little less painful in terms of set up.
A little painful is probably an understatement. TeamCity rocks!
In about 10 minutes I have a build server up and running, including install time! It was completely trivial. I use a build script (Nant or MSBuild) anyway so all I had to do was point source control, point to the to the script and I’m done. Completely painless.
For those not completely au fait with what a build server is, this is what TC is doing for me:
On check someone checking in code to source control:

  • It gets latest from the source control
  • Builds the code using my config
  • Performs static code analysis
  • Runs unit tests
  • Run integration tests
  • Deploys to a drop location, so our “tester” can always get a copy of what we are currently working on.

That’s a pretty basic build process but it is fine for me and our team. I am well happy with the last 20minutes of work, cheers Jetbrains!

Build scripts

I will be honest; I am pretty much a rookie at build scripts. I know some guys out there have weird and wonderful super complex complex NAnt, MSbuild, *ake files that do everything in including there dirty washing.
Well over the last year I have usually had a build script lying around that was kinda “just there”, more for assurance that what i was doing could be easily hooked in to a CI scenario. However I have been using the build script local over VS lately and am finding it pretty good. It certainly is a lot faster just to build the soln. I can also :

  • control what gets built
  • what tests are run
  • what code analysis gets done
  • if i need a distribution zip etc

all by clicking on a different bat file.
All of my tasks are in my NAnt file and each bat file just points to a different task.
I have a quick build (no test or code analysis), a standard build (build, run all unit tests and code analysis) and a deploy (standard plus zip the required files for a deploy).
Any solution bigger than a scratch pad can really benefit form a build script. The best thing is, if you are like me and many of your solutions have the same general structure, once you are happy with your defaults then you just need to change one or two parameters in the script for your different solutions.
If you are not using a local build script i would highly recommend it. I am just disappointed I have not been using it more in the past.

Build Tools

The number of available build tools in .Net grows daily it seems… and i feel i am falling behind.
MSBuild and NAnt are the standards in the .Net world but the uprising of Ruby has formed Rake, which is also usable in .Net. Rake is a Ruby implementation of the build tool Make which has inspired the .Net equivalent Boobs Bake from Ayende and now James Kovacs has PSake (pronounced sake as in the Japanese wine)….
I really will have to look into these… jeez i still haven’t played with Power shell and my Ruby and Boo skills have a lot to be desired!