buildbot的codebaseGenerator文档非常简单,简单到令人发指。

也没有一个例子,唉,辛苦了好几个小时才研究清楚怎么设置。

赶紧记录下吧,不然下次又要纠结。

应用场景:web status页面里面的 ForceScheduler使用codebases参数指定多个codebase,在页面Force启动时,可以动态对一个repository指定branch,URL等信息,
方便自定义。


首先,文档说了:
For any incoming change, the codebase is set to ''. This codebase value is sufficient if all changes come from the same repository (or clones). If changes come from different repositories, extra processing will be needed to determine the codebase for the incoming change. This codebase will then be a logical name for the combination of repository and or branch etc.
The codebaseGenerator accepts a change dictionary as produced by thebuildbot.db.changes.ChangesConnectorComponent, with a changeid equal to None.

配置主要涉及三个地方:
- 全局字典需要设置 'codebaseGenerator' 参数。
- ForceScheduler需要通过参数codebases指定相关的repository。
- source checkout step 需要通过codebase参数指定确定的repos。
关键配置代码如下:

REPOS1_URL = 'git@192.168.7.1:repos1.git'

REPOS2_URL = 'git@192.168.7.1:repos2.git'

all_repositories = {
REPOS1_URL : 'repos1',
REPOS2_URL : 'repos2',
} def codebaseGenerator(chdict):
return constants.all_repositories[chdict['repository']] c['codebaseGenerator'] = codebaseGenerator all_code_bases = [
CodebaseParameter(codebase = 'repos1'),
CodebaseParameter(codebase = 'repos2'),
] _schedulers.append(ForceScheduler(
name="manual_start_im_build",
builderNames=["builder"],
buttonName = "Do the magic",
codebases = all_code_bases,
properties = [ ],
))

buildbot的codebaseGenerator的更多相关文章

  1. 记录使用Buildbot遇到的坑

    Buildbot Tips Buildbot也是个大坑..我并不熟悉python,偏偏文档又少.这几天使用buildbot出了不少坑.有的解决了,有的绕过去,这里都把它们一一记下来. Force Bu ...

  2. buildbot入门系列—介绍篇

    一.介绍 1. buildbot是一个开源的基于python的持续集成系统,它能够以下三种方式触发相应的自动构建和测试运行,从而迅速的发现问题所在,同时指出造成这个错误的开发人员,当然我们还可以通过页 ...

  3. Django 应用 Buildbot

    Django作者之一 JACOB KAPLAN 所写的buildbot应用在Django系统. 全文总共分为两个部分 1,http://jacobian.org/writing/ci-is-hard/ ...

  4. buildbot 自动启动

    buildbot的master或者slave,一般配置好了之后, 总希望永久可用,即使机器因为某些原因重启了,也会自动启动. 官网文档不推荐使用root启动master. 而是使用用户级别的cront ...

  5. 使用buildbot实现持续集成(转载)

    转载自:http://www.oschina.net/p/buildbot 使用 Buildot 实现持续集成 使用基于 Python 的工具实现持续集成的理论与实践 牛仔式编码的日子在大多数组织中早 ...

  6. 入门系列之在Ubuntu 16.04使用Buildbot建立持续集成系统

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由angel_郁发表于云+社区专栏 介绍 Buildbot是一个基于Python的持续集成系统,用于自动化软件构建,测试和发布过程. 在 ...

  7. buildbot环境搭建—master篇

    好久没写博客来,最近没有深入研究东西,所以写不出什么特别有技术含量的东西,但是,每周出产博客的习惯不能荒废掉,所以就写一下,这个星期学习的简单到东西. 关于buildbot,它是基于python的一个 ...

  8. version control system:git/hg/subversion/cvs/clearcase/vss。software configruation management。代码集成CI:Cruisecontrol/hudson/buildbot

    version control system: git/hg/subversion/cvs/clearcase/vss software configruation management: daily ...

  9. 制作基于Buildbot的自动化测试系统Docker镜像

    Buildbot in Docker 前言 最近使用Buildbot做了一个自动测试的框架,为了部署方便,可以把测试框架做成Docker镜像,方便部署.这里记录下过程,供大家参考. 项目介绍 项目是一 ...

随机推荐

  1. mac系统xcode升级等软件更换appid账户

    删掉xcode 后发现 还是 会存在更新项,点击还是会提示输入之前app id 账号的密码 经过搜索和分析,发现是 Spotlight 在捣鬼,文件和目录删除了,但是索引文件没有被更新. 依次执行下面 ...

  2. Yii2 主从 数据库

    配置方法 参考资料:http://www.linuxidc.com/Linux/2015-07/120134.htm 读写分离(Read/Write Splitting). 1.原理:让主数据库(ma ...

  3. Spring 中的 JDBC 事务

    Spring 对 JDBC 的支持 JdbcTemplate 简介 •为了使 JDBC 更加易于使用, Spring 在 JDBC API 上定义了一个抽象层, 以此建立一个 JDBC 存取框架. • ...

  4. MATLAB 例子研究 Motion-Based Multiple Object Tracking

    这个例子是用来识别视频中多个物体运动的.我要研究的是:搞清楚识别的步骤和相应的算法,识别出物体运动的轨迹. 详细参见官方帮助文档,总结如下: 移动物体的识别算法:a background subtra ...

  5. 《TCP/IP详解卷1:协议》第2章 链路层-读书笔记

    章节回顾: <TCP/IP详解卷1:协议>第1章 概述-读书笔记 <TCP/IP详解卷1:协议>第2章 链路层-读书笔记 <TCP/IP详解卷1:协议>第3章 IP ...

  6. iOS 模拟器上录制Demo视频

    在App审核中会让用户上传一段简易的视频,那么如何制作改视频呢? 今天无意中在Cocochina 中看到 说利用QuickTime来制作,而QuickTime是操作系统自带的. 哦 My,God ! ...

  7. 在eclipse中安装配置WebDriver

    安装好eclipse环境后,下载Selenium jar包 在eclipse中新建一个java project 之后选择新建的工程,将Selenium jar包中的lib文件夹和selenium-ja ...

  8. JS rem 设置

    (function () { var docEl = document.documentElement; var resize = 'orientationchange' in window ? 'o ...

  9. Call to undefined function curl_init()

    运行PHP不支持curl_init()的解决方法: 1.修改php.ini,将;extension=php_curl.dll前面的分号去掉(同时检查扩展的引用路径是否正确)2.拷贝libeay32.d ...

  10. qsort函数用法【转】

    qsort函数用法 qsort 功 能: 使用快速排序例程进行排序  用 法: void qsort(void *base, int nelem, int width, int (*fcmp)(con ...