login
Blurts on the Art of Software Development

Today | RSS | RDF | Atom | Other Tags
Categories : All | All | CI | .NET | General | Humour | Java | Personal | Reviews | Ruby | SW Eng

Update: So many people seem to keep coming to this blog post from Mike Clark's blog that I feel it might make sense to mention that the WeblogPublisher has been incorporated into the CruiseControl distribution already a while ago. In other words, no need to download the stuff from the attached URLs--just use a recent enough version of CruiseControl and you're all set.

Well, since Mike hinted that it would be easy, I couldn't resist spending an hour to hack together a BloggerWeblogPublisher.java which posts the build results to a specified weblog using the Blogger API.

This is what it looks like at the time of writing

Just throw the publisher class to your CruiseControl directory, download xmlrpc-1.2-b1.jar into the lib directory, rebuild cruisecontrol.jar, and add these to your CruiseControl config.xml:

<cruisecontrol>
    <project name="foo">
        <plugin name="weblog" classname="net.sourceforge.cruisecontrol.publishers.BloggerWeblogPublisher"/>
        ...
        <publishers>
            <weblog blogurl="http://localhost:8080/pebble/xmlrpc"
                    blogid="blog"
                    username="lasse"
                    password="password"
                    category="CruiseControl"
                    reportsuccess="always"
                    subjectprefix="[CruiseControl]"
                    buildresultsurl="http://buildserver:8080/cruisecontrol/buildresults"                                                          logdir="/cruisecontrol/logs/foo"
                    xsldir="/cruisecontrol/reporting/jsp/xsl"
                    css="/cruisecontrol/reporting/jsp/css/cruisecontrol.css"/>

        </publishers>
    </project>
</cruisecontrol>

It's far from finished, but it seems to be "usable" already if you're itching to see your build results in your RSS aggregator. I'll submit it to the CruiseControl committers when it's a bit more polished...

The code is based on CruiseControl's EmailPublisher and HTMLEmailPublisher.




Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 9 + 9 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

TrackBack to http://radio.javaranch.com/lasse/addTrackBack.action?entry=1099095285000