[Buildbot-devel] RSS feeds and microsummaries

Grig Gheorghiu grig at agilistas.org
Wed Nov 8 21:06:34 UTC 2006


On 11/4/06, Lieven Govaerts <lgo at mobsol.be> wrote:
>
> José Dapena Paz wrote:
> >       I've uploaded a patch to the Buildbot tracker to provide a (very
> basic)
> > support for an RSS feed in waterfall display. You can get it here:
> >
> >
> >
> http://sourceforge.net/tracker/index.php?func=detail&aid=1560660&group_id=73177&atid=537003
> >
> >       It's working in our multiproject prototype for Fisterra:
> >       http://buildbot.fisterra.org/
> >       http://buildbot.fisterra.org/buildbot/fisterra-base/rss
> >
> >       It's a very simple patch. Now it only reports failing builds, as
> it's
> > what I was using. But it could be easily improved to make it more
> > configurable.
>
> I've used José's patch as a starting point to setup RSS and ATOM feeds
> for the buildbot for the Subversion project. For our purposes I had to
> make a lot of changes:
>
> - supports both RSS 2.0 and ATOM 1.0 (minimal support though, will be
> reviewed soon)
> - instead of showing the result of the last build for each builder, this
> code feeds not only the last, but all FAILed builds, whatever the
> builder. Currently nr. of entries is limited to 25.
> - each feed entry contains:
>   .) timestamp of the build, branch, svn revision and buildername.
>   .) a link to the build information page
>   .) author of the change
>   .) name of the failed step
>   .) last 30 lines of the log of the last (normally also failed) step
> - this is not a patch to the buildbot code, but a completely separate
> implementation, no modifications to the bb code are needed. I like this
> approach better, it makes it easier to keep in sync with buildbot
> releases.
> - the code is reorganized a bit to better support the two output formats
> rss and atom.
>
> Example configuration:
> c['status'].append(
>     Feeder.WaterfallWithFeeds(
>         http_port="tcp:"+str(private.htmlPort)+":interface=127.0.0.1",
>         css="/home/buildbot/masterdir/buildbot.css",
>         favicon="/home/buildbot/masterdir/favicon.ico")
>     )
>
> The latest version of the code can be found here:
> http://www.mobsol.be/svn/public/buildbot/trunk/config/masterdir/Feeder.py
>
> Obviously the code can be improved in a lot of places, it's the first
> version after all. Hope someone can put it to good use, feel free to use
> it. Feedback appreciated.
>
> Lieven


Hi, Lieven

Thank you very much for making your code public. I was able to incorporate
it into the Pybots buildbot farm (http://pybots.org), with just a small
change necessary for people running Python 2.3 and earlier. It has to do
with the sort method, which doesn't have the "key" keyword argument in
Python 2.3. Here's my code:

    # We apply Decorate-Sort-Undecorate
    deco = [(build.getTimes(), build) for build in builds]
    deco.sort()
    deco.reverse()
    builds = [build for (b1, build) in deco]

This replaces this line in Feeder.py:

builds.sort(key=lambda build: build.getTimes(), reverse=True)


Grig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20061108/772736a5/attachment.html>


More information about the devel mailing list