'cruisecontrol'에 해당되는 글 1건

  1. 2010.01.31 The CruiseControl, Composite builder continues on failure
We can work IT out2010. 1. 31. 14:29
Few days ago, there was a minor version up to 2.8.3 on the CruiseControl since they had released previously latest 2.8.2 almost a year before. They are versioning up once in a while, which mean the CruiseControl is quite stable and also satisfying large number of users as a most populer tool for Continuous Integration. On the other hand, it looks like rather lazy to me because there are some bugs have not been fixed since reported quite long time ago (ex. time zone problem) and a few improvements every Tome, Dick, and Harry can think about.

Fortunately, the CruiseControl is well structured so that a novice programmer, I can fix and improve it for myself. Hope I can afford the time to put effort on it and contribute to the world. And here's the first step, a tiny thing about improving composite builder.

By binding up your builders with composite builder, you can run dozens of builders on single modification event. But in this case, with the composite builder, the second exec builder might not execute when the first ant builder show up an error. There's no way to ignore the error to make next bulider execute. So you should write a script which wraps all the builders and finally, the composite builder became useless cause the script takes the role. That's why I decided to modify the source of composite builder and add "continueOnFailure" option as an attribute of <composite/> element.

Here's a part of "config.xml" file as an example show you how to use.
<modificationset>
    <alwaysbuild/>
</modificationset>
<schedule interval="10">
    <composite continueOnFailure="true">
        <exec command="./error.sh" args="1" workingdir="/home/lyle/cruisecontrol-bin-2.8.3"/>
        <exec command="./error.sh" args="2" workingdir="/home/lyle/cruisecontrol-bin-2.8.3"/>
    </composite>
</schedule>

And the script "error.sh" for a test ran by exec builder is simple.
#!/bin/sh

echo "==============EXIT WITH ERROR==================="
exit $1

There are no differences between 2.8.3 and 2.8.2 on Composite Builder. So just download "CompositeBuilder.class" attached below and update existing archive "cruisecontrol.jar" with the command line shown beneath in your CruiseControl home dir. Of course you should restart your CuirseControl after this.
$ jar -uvf cruisecontrol.jar net/sourceforge/cruisecontrol/CompositeBuilder.class
Posted by Lyle