views:

789

answers:

3

I am currently trying to use NAnt and CruiseControl.NET to manage various aspects of my software development. Currently, NAnt handles just about everything, including replacing environment specific settings (e.g., database connection strings) based on an input target that I specify on the command line.

CruiseControl.NET is used to build the application for the default environment (dev) anytime new code is committed. I also want CruiseControl.NET to invoke a build for my additional environments test and stage, but I do not want these to be automatically invoked every time that a dev build invoked (daily) as test and stage deployments happen far less frequently. Test and stage deployments only occur when the application is ready for QA.

I can easily do this by specifying multiple projects, one for each environment. However, I already have many projects configured, one for each milestone in within my application. If I have to setup 3 projects for each milestone the CruiseControl.NET configuration can get out of hand quickly.

Here is my question: Can I parameterize a CruiseControl.NET project configuration such that the parameters are exposed by the web interface?

Preferably (I think), I could have checkboxes for each environment (e.g., dev, test, stage) exposed in the web interface. A build would be made for each environment that is checked, whether the build was forced or automatic. It would be even better if I could default the checked state.

+2  A: 

Unfortunately, you can't do anything like that with CruiseControl.NET. It's a good idea, so you might want to submit it as a feature request.

Scott Dorman
+3  A: 

As Scott has mentioned, this isn't available, but it wouldn't take too much just to write a little template and then auto-generate the ccnet.config file given that template and a list of environments in a mail-merge type way.

Andy Whitfield
I completely agree. This is what we do for now and it works great. As long as you're comfortable with XML, it's fairly straight forward.
Scott Saad
+1  A: 

This feature (Dynamic Build Parameters) is currently being worked on for 1.5, and you can try it out in the nightlies. Here's a post describing the feature.

bentsai
Thanks! Looks very interesting and I should be able to do what I need. How stable are the nightly builds?
Ryan Taylor
I haven't tried the recent nightly builds. They seem to be about as stable as the releases...:)
bentsai