[Buildbot-devel] Daily builds

Brian Warner warner-buildbot at lothar.com
Fri Jun 17 01:02:05 UTC 2005


> What would be the best way to kick off a daily build for a particular
> target?

Just set 'periodicBuildTime'=SECS in the dictionary that goes into
c['builders']. So to make your 'docs' builder run once a day, turn this:

 c['builders'] = [{'name':'docs', 'slavename':'bot-foo', 'builddir':'workdir',
                   'factory':f}]

into this:

 c['builders'] = [{'name':'docs', 'slavename':'bot-foo', 'builddir':'workdir',
                   'factory':f, 'periodicBuildTime'=24*60*60}]


I can't remember offhand if the build gets run at the beginning or the end of
that time period (i.e. whether you should expect to see a build started as
soon as you reconfigure the buildmaster with this setting, or if you have to
wait the whole day before anything happens).

> In this case I'd like to generate documentation but only want to go it
> daily (or maybe every few hours), not after every change.

To have some Builders pay attention to changes and othere only run
periodically, you'll need to put one of those isFileImportant methods on the
timer-based build that will ignore everything. Otherwise it will build after
Changes too. Alternatively, you can just set a fairly long treeStableTimer on
that builder, that will keep the Change-triggered builds from happening too
frequently.

(incidentally, the Scheduler work makes this a lot cleaner: there is a
scheduler.Periodic class that fires in the same way as periodicBuildTime
behaves, and it would be little work to write a class that fires the build at
specific times of day. Having a Builder not run in response to Changes is as
simple as not hooking up the usual Change-based Scheduler to that Builder.)


cheers,
 -Brian




More information about the devel mailing list