views:

732

answers:

5

We are using cruisecontrol as our CI tool. I would like to know how to override the build numbers assigned by the cruisecontrol.

The reason is: We have parallel cruisecontrol sessioon running for different modules and i don't want to have different build numbers for each module rather same number to relate it.

A: 

AFAIK, this is not possible using standard CruiseControl (without custom plugins)

The closest thing is the "remoteProjectLabeller" labeller, which will use the build label of another project:

 <labeller type="remoteProjectLabeller">
  <project>OtherProject</project>
 </labeller>
Philippe Leybaert
A: 

remoteProjectlabeller is for CC.NET not for cruisecontrol

Thanks Philippe

This should be a comment to his answer, not an answer.
Robert Munteanu
A: 

I'm doing the same thing. The easy obvious solution for me was to have 2 instances of CC running on 2 config.xml files, one for each project. They'll each get their own build number, repository, customization, etc.

A: 

If you are using Subversion, there is a method of labeling your build in svn and then retrieving that label for use in other builds. Unfortunately, I have never set this up, only seen it used, so I can't offer any details on how to implement it.

Chris Johnston
+1  A: 

The answer may be coming too late for the person that asked this question. But I am recording the solution here for the benefit of anyone else that may need this information.

I just tried this out with our newly upgraded (2.8.2) cruisecontrol and it really works fine.

  1. Use the labelincrementer task to get some flexibility in this fashion: On your config.xml use the task: < project >

    < labelincrementer defaultLabel="my.cruise.build.1" />

    </project>

  2. Make sure you dont have any serialized build files in your cruise home directory (the file will have a name <*your_project*>.ser. If you do see this file from your previous build attempts, delete it. Dont worry it will get recreated. This is required to prevent the build tasks form peekinginto this file and upping the number in the previous format rather than the new one you just specified in the config.xml

  3. Remove/cleanup all log files from the log directory (from <cchome>/logs/<*project_name*> area) This is required to avoid the build tasks from referring into the label values form the previous builds.

Once you have done all of this as specified, run the build and you will see the label for the next build the way you specified in "my.cruise.build.1"

Look up this page if you need more info: http://cruisecontrol.sourceforge.net/main/configxml.html#labelincrementer

Critical Skill