Can I keep CruiseControl.Net's ccnet.config in svn, then have CruiseControl update its own config file when a change is checked in?

StackOverflow https://stackoverflow.com/questions/543778

Question

I'd like to be able to keep our CruiseControl.Net's ccnet.config file in svn, then when I check in a change, ie, I've added a new project, it will update itself.

This way I have the config file under source control and I can track the changes being made.

I do realize that I could check in a change that will screw up CruiseControl to a point where I'd have to have some manual intervention, but in the general case, this sounds like it would work very nicely.

However, this loop seems like it could possibly create a black hole and destroy the world. I'd like to keep that off my conscience if at all possible.

Any thoughts?

Was it helpful?

Solution

We're doing almost exactly that and no black-holes have appeared...or maybe they did and just evaporated? :) CruiseControl.NET handles it very well, it will even wait until any other builds have finished before restarting.

Our process sounds a little more complex, here's a brief rundown on the workflow:

  • On our "Omega" builds (RTM, GA, Gold, ...) for a project we automatically create a new ccnet project. Project is based on a branch (whose name is also generated automatically from assembly version) which is also created at the same time.
  • The new project is added, ccnet.config is updated to reference it, working copy is updated, committed, then updated.

So it takes (at most) 2 clicks for us to create a release build from ccnet - one click to create the branch and ccnet project, then another click to force the first build against the release branch, or you can just wait for the inevitable patch ;-)

Happy to provide further details if you want them.

OTHER TIPS

I also didn't like having to manually change the ccnet.config. Here is was I did:

Added the ccnet.config (and related) to svn. Made a project 'Configuration' and added the following parts:

  • SourceControl block to check out the config to a 'Prep' dir.
  • Copy config file that are not in svn (security config part) to the 'prep' directory.
  • Run CCNetValidator agains the 'Prep' directory
  • Checkout the config to the actual config location.

The thing I like most about this is that when I make a mistake in the config I have a failing build, but the actual config is not yet updated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top