[Buildbot-devel] writing custom sources?

Brian Warner warner-buildbot at lothar.com
Mon Jul 28 17:36:12 UTC 2003

> The logfile source starts to work. It's quite ugly. I compare dates
> between a log file of checkins and a log file of builds. That's cause I
> don't use CVSToys and use something else.
> With the polling strategy I also need to be careful not sending further
> changes until the checkins log evolves again (i.e. store last change
> emission).

Is it possible for the tool or program which appends those items to the log
file to do something else instead? In the past I've used 'safecat' to put
the item into a new file in a maildir folder, and then connected to a
unix-domain socket inside the maildir. On the receiving end, I had the unix
socket mixed into the poll() array, and a connection attempt meant it was
time to scan the maildir/new directory for new entries. This queueing scheme
worked even when the buildmaster was offline, because at startup (after it
was listening on the unix socket) it would just process maildir/new/* .

I haven't translated this into Twisted because I went down the DNotify path,
but it'd be pretty easy. reactor.listenUNIX and a protocol that does stuff
in .connectionMade() (and then does .loseConnection).

> I can send you that code but it's not very interesting really. A proper
> example in the source might be good though.

Agreed, something to show alternate means of triggering builds would be
handy. It'd be nice to have a list of what kinds of change notification
schemes projects tend to use..

BTW, there is now a syncmail parser in CVS. This script (maintained at
syncmail.sf.net) is the notify-by-email scheme which SourceForge recommends
in their CVS admin docs. Hopefully this should make it easier for sf.net
projects to set up buildbots.


More information about the devel mailing list