0

I have a multiple project which is defined in ccnet.config file in below.it's very confusing to read.there is anyway, we can split these project file in some location path.and call these project file in ccnet config.please help me out for these issue.

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

2 Answers2

2

It's better to use the pre-processor, it will also the system when one of the sub-files change. http://www.cruisecontrolnet.org/projects/ccnet/wiki/Configuration_Preprocessor

You can look at an example here : http://www.cruisecontrolnet.org/projects/ccnet/wiki/Scenarios Step 2 Build on Check-in, and next steps.

It will show you how that example config grows when there are new requirements for the build server.

Williams
  • 741
  • 1
  • 4
  • 11
  • I agree the preprocessor works well when you have consistency between projects. I got my "add a new project to build" down to one line using the pre-processor commands. But if each project can't follow a standard template....then the "ENTITY xxxxxx SYSTEM" stuff makes more sense, IMHO. – granadaCoder Oct 08 '13 at 13:42
  • even without that 'consistency', I would use the preprocessor, just because it also watches these linked files. that's all that is needed to include a file, and it will be watched – Williams Oct 10 '13 at 10:12
1
<!DOCTYPE cruisecontrol [
    <!ENTITY project1 SYSTEM "file:project1.xml">
    <!ENTITY project2 SYSTEM "file:project2.xml">
]>
<cruisecontrol>
  &project1;
  &project2;
</cruisecontrol>

From:

http://www.cruisecontrolnet.org/projects/ccnet/wiki/TheCruiseControlConfigurationBlock

Note, the one "gotcha" is that if you change any of the "sub-file"'s, the system will not recycle ....... (as it would if you made a change to ccnet.config ). The work around is to change the sub-file, then add a space (or take a space) (or some other whitespace character) in the ccnet.config file).

granadaCoder
  • 26,328
  • 10
  • 113
  • 146