使用 Buildbot 支持多个存储库
目前 Buildbot 不支持多个存储库。如果需要这一点,则需要运行单独的 Buildbot 实例。
我仍然很好奇是否有人想出了一个创造性的解决方法来让这个功能正常工作。
Currently Buildbot does not support multiple repositories. If one desires to have this then separate instances of Buildbot need to be run.
Still I'm curious if anyone has come up with a creative workaround to get this feature working anyway.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
更新
这个答案最近收到了一些反对票,请注意,这个答案适用于 2012 年底/2013 年初发布/使用的 buildbot 版本,可能不适用于未来的版本。
原始答案
正如@Macke所说,buildbot (>= 0.8.x) 支持多个项目/存储库。这是通过如下配置完成的:
您可以看到更改源中的
project
参数随后在调度程序的change_filter
属性中再次使用,以确保调度程序仅响应到那个特定的变化源。这允许您配置多个更改源和多个调度程序来响应明确选择的更改源。Update
This answer received a few downvotes recently, please note that this answer applies to the releases of buildbot that were published/used around the end of 2012/beginning of 2013 and may not be applicable for future versions.
Original Answer
As @Macke said, buildbot (>= 0.8.x) supports multiple projects/repositories. This is done with configuration like the following:
You can see that the
project
parameter in the change source is then used again in the scheduler'schange_filter
property to ensure that the scheduler only responds to that particular change source. This allows you to configure multiple change sources and multiple schedulers responding to explicitly chosen change sources.自 0.8.7p1 版本以来,buildbot 支持 多个代码库
Since the 0.8.7p1 release, buildbot supports multiple codebases
事实上,我不明白为什么你说它不支持多个存储库......你可以为每个存储库创建一个轮询器和多个调度程序,这些调度程序对不同的轮询器进行 ping 操作并获取许多不同存储库的构建(无论是在主服务器运行的同一台机器,或者您可以在不同的机器上有一个专用的从服务器)。
您希望避免拥有多个实例,但例如,主服务器和从服务器共存于同一台机器上,即使按顺序启动和停止它们很痛苦,否则您会收到冲突错误:)
Indeed i don't get the reason why you say that it does not support multiple repositories....you can create a poller for each repository and multiple schedulers that ping the different pollers and get the builds for many different repositories (either on the same machine where the master runs, or you can have a dedicated slave on a different box).
You want to avoid to have multiple instances, but for example, master and slave coexist on the same machine even if is a pain to start and stop them in order, otherwise you get conflict errors :)
|>目前 Buildbot 不支持多个存储库。
我不太明白这个问题..抱歉。你的意思是你必须运行多个主服务器?实际上,buildbot 开发人员建议这样做,但对我来说恰恰相反:您可以在同一个
master.cfg
中拥有多个从属设备(瀑布中的列),并且对于每个或它们都有一个 < code>BuildFactory 具有不同类型的第一步:Git(repourl=...)
和/或Mercurial(repourl=...)
等。每个都将从不同的存储库克隆/拉取,您甚至可以添加后续步骤中所需的更多签出(使用 Maven 或直接使用 scm 客户端)。拥有唯一的
master.cfg
文件的唯一问题是所有构建器都只有一种方法来获取更改通知;即:例如,我们有PBChangeSource()
(master 通过远程代码通知,它无关)。例如,如果您的 SCM 具有良好的 PBChangeSource 支持(例如 svn、hg、git),而其他 SCM 的支持较差(例如 MKS),那么您应该有两个主服务器实例来应对这种情况。希望它会有所帮助。
|> Currently Buildbot does not support multiple repositories.
I don't really understand the question.. sorry. Do you mean that you have to run multiple master servers? It is actually advised by the buildbot devs to do so, but the contrary works for me: you can have in the same
master.cfg
multiple slaves (columns in the waterfall) and for each or them aBuildFactory
with different first steps of the type:Git(repourl=...)
and/orMercurial(repourl=...)
etc.Each will clone/pull from different repositories and you can even add some more checkouts that are needed in subsequent steps (using maven or directly your scm client). The only issue with having a unique
master.cfg
file is that all builders will have only one method for getting notifications of changes; we have for examplePBChangeSource()
(master is notified by remote code, it has nothing to do). If for instance you have an SCM with good PBChangeSource support (e.g., svn, hg, git) and an other ones with bad support (e.g., MKS) then you should have two master server instances in order to cope with that.Hope it'll help.