Dave Donaldson

Critical thinking in software development

Search

Advertisement

Subscribe

My Tweets

  • @willburrus Haven't seen your email. Sorry, thought you would have seen mine earlier.
  • @hkarthik I can't get my avatar to look quite like me. Need to spend more time with it I guess.
  • Listening to new G 'N R album early on their MySpace page (http://www.myspace.com/gunsnroses). Still formulating an opinion.

CC.NET 1.4 Feature: Artifact Cleanup Publisher

Wednesday, June 18 2008

I didn't really have intentions of writing a mini-series dedicated to new features in CruiseControl.NET 1.4, but I keep finding good stuff, so I might as well keep writing (see here and here for previous posts).

One of the key mechanisms of CC.NET is how it writes information to the XML build logs. The build logs can contain a ton of information, depending on how you've configured your build scripts. For example, the build logs for each of our builds contains the results from *at least* MSBuild, FxCop, and BitDiffer (of which I will post about very soon). Each of those tools produce a lot of data that gets merged into the build logs, thus creating build logs that are several MB in size. Obviously, that adds up very quickly so you have to take measures to periodically remove old build logs, all because you have thousands of them taking up several gigs of disk space.

However, with the 1.4 release, CC.NET can take care of cleaning up old build logs automatically with the new Artifact Cleanup Publisher. For example, let's say you only want to keep the last 100 build logs. To do so, you simply add the following to your <publishers> section:

<artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="100" />

Or what if you only want to keep the builds from the last 7 days? To do that looks like this:

<artifactcleanup cleanUpMethod="DeleteBuildsOlderThanXDays" cleanUpValue="7" />

Yes, it really is that simple. The only caveat is that the <artifactcleanup> node must be defined *after* the <xmllogger> node in the <publishers> section, but that's all there is to it. Enjoy.

Similar Posts

  1. Configure Sandcastle To Use Your XML Comment Files
  2. Balancing Technical Debt with Feature Work
  3. Use a Single Web.Config for IIS6 and IIS7

Post your comment

Comment