views:

692

answers:

3

We currently have a CruiseControl.Net server that is merrily building the trunk on our svn server. I have a new requirement to build the "latest" branch as well; is there a best practice in CruiseControl to handle this? What specific changes are needed to build from the trunk and a branch at the same time?

+5  A: 

Make a second project just like the original where the source control is pointed to the proper branch.

Mark Allen
That's exactly what we do. As long as the Working/Artifact/TrunkURL settings are configued properly then this is not a problem for CCNet.
DilbertDave
A: 

I generally create a new working directory named branch, set up the source control to monitor the branch and pull to the new folder. I also put in an exculusion filter on the trunk build so it does not get kicked off by a check in to the branch (our branches usually reside within the trunk realm of checking for changes). I also remember to change the labels, if we label, to reflect the branch naming convention. One very helpful thing you can do is if you will only ever have one branch active simply name it branch that way once you have your configuration all set You only have to comment or uncomment those parts in the config file as needed, instead of having to upgrade it in all the places like if one time it is branch 6.1 and next time it is 6.2, it saves a lot of cut and replace and I only have to changed the project name and the label the next time we use a branch.

Alex
A: 

As far as Cruisecontrol.net is concerned, a project is a project. It doesn't care whether it's a branch or a trunk. Simply setup another project in the ccnet.config that points to where the branch is located.

To keep things organized, i like to add the version number to the name of the branch projects like this:

ProjectX <- Trunk
ProjectX-4.0 <- Historical branch for v4.0

michael.aird