If you cannot take advantage of post-receive hooks as provided by
contrib/git_buildbot.py
for example, then you can use the GitPoller
.
The GitPoller
periodically fetches from a remote git repository and
processes any changes. It requires its own working directory for operation, which
can be specified via the workdir
property. By default a temporary directory will
be used.
The GitPoller
has only been tested with git
version
1.7.0.3
- your mileage may vary.
GitPoller
accepts the following arguments:
repourl
git@example.com:foobaz/myrepo.git
(see the git fetch
help for more info on git-url formats)
branch
'master'
workdir
<tempdir>/gitpoller_work
pollinterval
gitbin
'git'
category
GitPoller
.
This will then be set in any changes generated by the GitPoller
, and can
be used in a Change Filter for triggering particular builders.
project
GitPoller
.
This will then be set in any changes generated by the GitPoller
,
and can be used in a Change Filter for triggering particular builders.
usetimestamps
True
), or ignore it in favor of the current time (so recently processed commits appear together in the waterfall page)
from buildbot.changes.gitpoller import GitPoller c['change_source'] = GitPoller('git@example.com:foobaz/myrepo.git', branch='great_new_feature')