Wednesday, 2 July 2008

Team City - code analysis

I have been playing with TeamCity on my latest project as a build tool and it is awesome!

The key killer features it has over our current build server (Bamboo 2) are
  • Ability to run static code analysis
  • Ability to kill (automatically on overtime) builds
  • Remote Commit from Eclipse/IntelliJ
Static Code Analysis
Teamcity can run ALL of IntelliJ's code analysis tools on your maven build.  You can either run the default profile (which runs with default settings) or you can configure a custom set of code analysis tools that run with your own rules.

I have this set up so it runs nightly all the code analysis on our entire codebase (this takes over an hour) and on each commit it runs a much stricter (but shorter) set of code analysis (this takes 10 minutes). This catches (as a build failure) the most common mistakes and gives me access to the full analysis results in IntelliJ via the TeamCity plugin.

Killing Builds

We all hate it when our builds hang - with our current build server solving this requires hunting around with 'ps -ef | grep java' until we find the offending bit of maven that has hung (and it usually is maven). 

TeamCity can kill the build for you via the web interface. It can also kill builds that take too long to run automatically. 

Remote Commit

This allows you to run your whole build on the server and just wait for the results. In both Eclipse and IntelliJ with the plugin it will automatically commit your changes if the build passess.

This makes it a lot easier to manage build breakages - you can let the server do all the hard work while you keep working on other work.

Problems :(
However as with everything it has some bad points.
  • Jabber Support - It does in theory support Jabber however it doesn't work with Google Talk our preferred jabber server. The reason is the admin GUI doesn't expose the required fields to connect to it (the library they use does support Google Talk). 
  • Eclipse Subversive vs Subclipse. We (and Eclipse.org) have moved to Subversive for our Eclipse plugin however the Team City plugin only works with Subclipse :(
  • Solaris Support - The build agents for TeamCity run on Solaris but the kill functionality doesn't work. This matters to us as we have a Sun  Fire V890 as a build server and therefore want to use it!

1 comments:

pavel said...

Hello, I am one of TeamCity developers.

As far as I know TeamCity supports google talk. Try the following setup:
Server: talk.google.com
Port: 5222
Server user: full username with domain part if you use Google Apps for domain

Stopping of builds on Solaris, should work too since in 3.1.2 release we reworked our stop build functionality.

Also there are good news about Subclipse/Subversive. We are going to take a look at this problem in the next version (TeamCity 4.0).