[Buildbot-devel] Web server on master

Brian Warner warner-buildbot at lothar.com
Tue May 10 08:32:23 UTC 2005


> I'd like to display some static HTML (possibly dynamic in the future),
> served from my build master. Is there a way to configure this through
> Buildbot?

Yeah, although it isn't as easy right now as it ought to be. In particular,
it will require modifying buildbot/status/html.py, whereas it ought to be
possible to do entirely through the config file.

Start by reading up on how twisted.web works (the Twisted howto docs probably
have something). You want to understand how the Resource tree works. The
b.s.html.StatusResource forms the root of a tree. If you request a child URL
like "http://buildbot.foo.com/static", that StatusResource's .getChild()
method will be called with a path="static" argument. You want to change
StatusResource.getChild to recognize your URL component and return something
else, probably a twisted.web.static.File resource (which serves a
subdirectory of files off the disk).


This needs to be changed to let you get access to the StatusResource object
directly from the config file. Then you could just do sr.putChild("static",
static.File("subdir")) in the config file instead of having to modify
buildbot code.

hope that helps,
 -Brian





More information about the devel mailing list