Next: , Previous: GoogleCodeAtomPoller, Up: Change Sources


4.6.9 GitPoller

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
the git-url that describes the remote repository, e.g. git@example.com:foobaz/myrepo.git (see the git fetch help for more info on git-url formats)
branch
the desired branch to fetch, will default to 'master'
workdir
the directory where the poller should keep its local repository. will default to <tempdir>/gitpoller_work
pollInterval
interval in seconds between polls, default is 10 minutes. For compatibility, this can also be spelled pollinterval
gitbin
path to the git binary, defaults to just 'git'
category
Set the category to be used for the changes produced by the 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
Set the name of the project to be used for the 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
parse each revision's commit timestamp (default is True), or ignore it in favor of the current time (so recently processed commits appear together in the waterfall page)

Example

     from buildbot.changes.gitpoller import GitPoller
     c['change_source'] = GitPoller('git@example.com:foobaz/myrepo.git',
                                    branch='great_new_feature')