Published by breki on 02 Feb 2009 at 01:21 pm
CCNet Filtered Source Control: Ready To Shoot My CI Server
UPDATE (April 1st 2009): no, it’s not an April fool’s joke… The fun continues with the new version of CCNet… read the update below
After about two hours of exercises in futility I finally managed to persuade CruiseControl.NET to start the build when a particular file on the disk changes. I was just about ready to give up and start implementing my own CI software before the following configuration managed to do what I wanted:
<sourcecontrol type="filtered"> <sourceControlProvider type="filesystem"> <repositoryRoot>C:\Temp\</repositoryRoot> </sourceControlProvider> <inclusionFilters> <pathFilter> <pattern>**/CopyAndRun.bat</pattern> </pathFilter> </inclusionFilters> </sourcecontrol>
Notice the <pathFilter> tag? I have no idea why only this particular filter value works. The file path I wanted to cover is C:\Temp\CopyAndRun.bat. I tried several other (and more logical) filter values, like:
- CopyAndRun.bat
- /CopyAndRun.bat
- \CopyAndRun.bat
- C:\Temp\CopyAndRun.bat
… and some others, but to no avail, CCNet reported that none of the modified files matched the specified filter. Needless to say I couldn’t find any relevant documentation and samples for this situation.
I’m more and more of the opinion that CCNet, although powerful and flexible, is pretty horrible for configuring and maintaining. Maybe it’s really time for me to start working on my own solution. Well, to be honest, I’ve already made first steps.
UPDATE (April 1st 2009): it turns out the new v1.4.3 version decided to do it differently… and breaks the existing behavior, again in an untraceable way. The configuration block I posted above doesn’t work anymore, the new configuration now looks like this:
<sourcecontrol type="filtered"> <sourceControlProvider type="filesystem"> <repositoryRoot>C:\Temp</repositoryRoot> </sourceControlProvider> <inclusionFilters> <pathFilter> <pattern>CopyAndRun.bat</pattern> </pathFilter> </inclusionFilters> </sourcecontrol>
Changes:
- repositoryRoot now must not have a trailing backslash
- pattern now works without the ** wildcard.
Again, it is very hard to determine the right configuration. The only help (if it is help at all) is the CCNet service log file, but it doesn’t really tell you why a particular file does not match the filter critieria. Urghhhhh…



Jonathan on 13 Oct 2009 at 12:49 #
I agree 100% with your comments regarding the hassle of using CC after stuffing around all moring trying to figure out why the path inclusion isn’t working. It’s like a commercial product being offered with no support contract. I feel the same kind of regarding Nant as well…
igorbrejc.net » Changing The Build Server on 12 Nov 2009 at 8:39 #
[...] had quarrels with CC.NET before. Now I think of CC.NET as a nice introduction into CI world, but after a while you need something [...]