使用Buildbot支持多个存储库 [英] Support for multiple repositories using Buildbot

查看:80
本文介绍了使用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.

推荐答案

更新



此答案最近得到了一些赞誉,请注意,此答案适用于2012年底/ 2013年初左右发布/使用的buildbot版本,可能不适用于将来的版本。

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.

正如@Macke所说,buildbot(> = 0.8.x)支持多个项目/存储库。这是通过以下配置完成的:

As @Macke said, buildbot (>= 0.8.x) supports multiple projects/repositories. This is done with configuration like the following:

# Set configuration to watch the Git repository for possible
# changes. When a change does occur the schedulers will be
# notified with the project data (TestProj).
c['change_source'] = []
c['change_source'].append(
        GitPoller( 
                repourl ='git://github.com/SO/my_test_project.git',
                project = 'TestProj',  
                branch  = 'master',
                workdir = '/home/buildmaster/repos/TestProj'
        )
)

# Set the schedule to run on each change, but only for the project
# specified above via the project information.
c['schedulers'] = []
c['schedulers'].append(
        SingleBranchScheduler(
                name = "TestProj-master",
                builderNames = ['TestProj-master-builder'],
                change_filter = ChangeFilter(
                        project = 'TestProj',
                        branch  = 'master'
                )
        )
)

您可以看到 project 参数在然后在计划程序的 change_filter 属性中再次使用更改源,以确保计划程序仅响应该特定更改源。这使您可以配置多个变更源和多个调度程序,以响应明确选择的变更源。

You can see that the project parameter in the change source is then used again in the scheduler's change_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.

这篇关于使用Buildbot支持多个存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆