一人 buildbot 勉強会

全然理解していないので参考にしないでください

$ sudo groupadd buildbot
$ sudo adduser -s /bin/false -d /dev/null -g buildbot buildbot

sudo buildbot create-master /home/buildbot/master

master.cfg

# vim: fileencoding=utf8 sts=4 sw=4

from buildbot.buildslave import BuildSlave
from buildbot.changes.pb import PBChangeSource
from buildbot.process import factory
from buildbot.steps import source, shell
from buildbot.scheduler import Scheduler
from buildbot.status import html
# ファイルアップロード
from buildbot.steps.transfer import FileUpload

c = BuildmasterConfig = {}
c['slaves'] = []
c['slaves'].append(BuildSlave('', ''))
c['slaves'].append(BuildSlave('', ''))
c['slaves'].append(BuildSlave('', ''))

c['slavePortnum'] = 9989

c['change_source'] = PBChangeSource()

c['schedulers'] = []
#c['schedulers'].append(Scheduler(name="all", branch=None,
#                                 treeStableTimer=2*60,
#                                 builderNames=["buildbot-full"]))

f = factory.BuildFactory()
f.addStep(
    source.SVN(
        #svnurl='',
        mode='update',
        baseURL='svn+ssh://svn.example.com/',
        defaultBranch='trunk'
    )
)

# Example OpenLDAP
#f.addStep(
#    source.CVS(
#      cvsroot=':pserver:anonymous@cvs.OpenLDAP.org:/repo/OpenLDAP',
#      cvsmodule='',
#      mode='',
#      login='OpenLDAP'
#    )
#)

#f.addStep(
#    source.Mercurial(
#        #repourl='',
#        baseURL='http://hg.example.com/',
#        defaultBranch='trunk'
#    )
#)

# ./configure
f.addStep(shell.Confiugre())
f.addStep(shell.Compile(command=['make', 'depend']))
f.addStep(shell.Compile(command=['make']))
f.addStep(shell.Test(['make', 'test']))

b_x86_centos_39 = {
    'name': 'x86-centos-39-trunk',
    'slavename': 'bot_centos_39_x86',
    'builddir': 'full',
    'factory': f,
}

b_sparc_solaris_10 = {
    'name': 'sparc-solaris-10-trunk',
    'slavename': 'bot_solaris_10_sparc',
    'builddir': 'full',
    'factory': f,
}

b_x86_solaris_10 = {
    'name': 'x86-solaris-10-trunk',
    'slavename': 'bot_solaris_10_x86',
    'builddir': 'full',
    'factory': f,
}


c['builders'] = []
c['builders'].append(b_x86_centos_39)
c['builders'].append(b_x86_solaris_10)
c['builders'].append(b_sparc_solaris_10)

c['status'] = []
c['status'].append(html.WebStatus(http_port=8010))

c['projectName'] = "Example Project"
c['projectURL'] = "http://example.com/"
c['buildbotURL'] = "http://example.com:8010/"

$ sudo buildbot start master