本文介绍了有buildbot轮询一个git仓库新的提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有插件,可以查询git存储库的新提交,如当前包含的?



我找到的最近的是,但它作为一个提交后的钩子,所以不会使用我的设置(使用Github和buildbot在一个机器上github的post-commit不能



我目前有一个构建运行一个小时,但没有真正的任何点运行测试,除非有

更改来源自版本0.8.2,并对原来的几个改进。






我们公司处于类似的情况在那里我们的构建机器不能通过GitHub的后提交钩子到达。我写了一个 GitPoller 更改源,可以像 SVNPoller 一样使用。



可以在这里找到:



和使用像这样:

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

它会创建一个本地repo工作(位置可配置),它只有测试与 git 1.7 所以你的里程可能会变化。



希望它会在某个时候进入Buildbot项目,但它一直为我们工作,希望它可能对其他人有用:)


Is there a buildbot plugin that will poll a git repository for new commits, like the currently included changes.SVNPoller?

The closest I have found is git_buildbot.py, but it works as a post-commit hook, so will not work with my setup (using Github, and buildbot on a machine that github's post-commit cannot reach) - simply polling the git repository would work perfectly.

I currently have a build run once an hour, but there's not really any point in running the tests unless something has changed..

解决方案

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('[email protected]: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 :)

这篇关于有buildbot轮询一个git仓库新的提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 00:30