February 16, 2006 - Sharing Pre-configuration

After I posted my blog entry on Template Projects with CruiseControl 2.4 Greg Gipson asked an interesting question on the CruiseControl users mailing list about sharing pre-configuration information across multiple CruiseControl servers that turns out to have an elegant answer (if XML Entities can be considered elegant).
As background, we have several CC servers running with several different lists of projects (and this [new] project preconfiguration will be a great thing!). So it would be nice to have all of the project preconfigurations in a single file for all the servers/project lists. Then we could just 'include' a common set of all of the project preconfigurations into each unique file per server.

It turns out this is actually a pretty good use for xml entities to pull an external file into your config.xml like so:

<!DOCTYPE cruisecontrol [
 <!ENTITY preconfig SYSTEM


 <project name="project1"/>
 <project name="project2"/>

This solution makes it easy to version and share a set of common pre-configuration settings across multiple servers using different projects.

Neat trick!

Posted by Jeffrey Fredrick at February 16, 2006 03:21 PM

Trackback Pings

TrackBack URL for this entry:


Post a comment

Remember Me?