views:

89

answers:

2

I'm trying to put together a Continuous Integration server that will do the following:

  1. Work with subversion
  2. Use NUnit tests (fail build on failed tests)
  3. Use partcover (fail build on < X% coverage)
  4. Run code against FxCop (fail build on FxCop warnings, given settings)
  5. Run code against StyleCop (fail build on StyleCop warnings, given settings)

Not as important:

  1. Be able to run from a sln file
  2. Be able to publish the application (ClickOnce is setup for the project already)

I'm using TeamCity right now and it doesn't seem to do 3 or 5, and it doesn't have a runner for the newest NUnit.

From the list of plugins that hudson has, it looks like it can do all of these except 3 (and the not as important requests). I've considered writing a plugin for hudons to use partcover, but that's adding more time to setting up a build server.

A: 

It's not a continuous integration server if it's run from a sln file. Perhaps you're mixing build tool and continuous integration. Many CI servers today does nothing but run build scripts made for other tools like NAnt or Maven. Look at NAnt first if it's what you're looking for. NAnt is able to do the build and execute other tools like FXCop (using NAntContrib library). You use CI server to run a build script on a regular basis.

easyCIS
+2  A: 

NAnt can be used as a build script which will build your projects and then execute NUnit and FXCop.

Another option, which is what I use at work, is create a build script for MSBuild and use the MSBuild Community Tasks which support running FXCop & NUnit among other things.

So for my setup CCNet pulls down the source from SVN then calls MSBuild with the main build file. Inside there it builds the projects, runs NUnit, NCover, FXCop, StyleCop etc. and merges the results which are then displayed on the CCNet webpage. Each task can also be set so if there's a failure the build fails.

I haven't used TeamCity but there should be a way to pull down the source and then run an MSBuild or NAnt build script which will then handle the build steps.

Brian Surowiec