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:
repourlgit@example.com:foobaz/myrepo.git
(see the git fetch help for more info on git-url formats)
branch'master'
workdir<tempdir>/gitpoller_work
pollintervalgitbin'git'
categoryGitPoller.
This will then be set in any changes generated by the GitPoller, and can
be used in a Change Filter for triggering particular builders.
projectGitPoller.
This will then be set in any changes generated by the GitPoller,
and can be used in a Change Filter for triggering particular builders.
usetimestampsTrue), 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')