更新时间:2023-11-30 14:29:52
Update: The kind folks at the Buildbot project have made the GitPoller an official Change Source as of version 0.8.2, and made several improvements to the original.
Our company is in a similar situation where our build machines cannot be reached by GitHub's post-commit hook. I've written a GitPoller
change source that can be used like the SVNPoller
.
It can be found here: http://github.com/wimba/buildbot/blob/master/buildbot/changes/gitpoller.py
and used like this:
from buildbot.changes.gitpoller import GitPoller
c['change_source'] = GitPoller('git@example.com:foobaz/myrepo.git',
branch='great_new_feature')
It will create a local repo to work out of (location configurable), and it's only been tested with git 1.7
so your mileage may vary.
Hopefully it will be pulled into the Buildbot project proper at some point, but it's been working for us so far and hoping it may be of use to others :)