My new buildbot

I've added some buildbot instances on various architectures to my new buildbot at http://perl514.cpanel.net/build/. I needed about a day to set it up.

Tested projects are so far: perl5, rakudo, nqp, parrot and p2.

The buildslaves are currently: centos5 (old system), cygwin, cygwin64, darwin (my macbook air), debian (fresh), mingw32 (strawberry), ppc (an old powerbook)

And soon: mingw64 (python refuses mingw64, demands msvc), freebsd, openbsd, solaris10 (intel 64bit)

All the slaves initiate the connection to the bot on some private tcp port, so they can all stay behind my firewall. Most of them are some vm's on my devbox, and I start/stop them at random.

The setup included installing python 2.7, setuptools, and then easy_install buildbot-slave. The configuration is a bit tricky, but it's python code, not just some data format, and not jenkins.

I currently only watch the main branches, not smoke-me. The biggest problem is that some projects are not "remake clean": git update + configure + make + make test might need a make clean or even a git clean -dxf before. This is fine if your smokers are big and fast, but my smokers are small and slow.

The UI is also not the best so far. I want to collect the projects into BuildSets, and eventually add bench mark data.

I already collected and fixed a couple of previously undetected bugs.

Eventually I'll add random CPAN module testing, against all my installed major perls on all these architectures. My old smoker just smoked the stable B::C against latest blead changes daily. And from time I get some cpantesters fail reports, but nothing helps in smoking beforehand and at once. There's some interface to add random builds via 'try'.

This is the buildbot master cfg:

# -*- python -*-
# ex: set syntax=python:

allslaves=["debian",
    "ppc", "darwin",
    "cygwin","cygwin64",
    "mingw32","mingw64","freebsd8",
    "openbsd49","solaris10","centos5",
    ]
projects=["parrot","nqp","rakudo","perl5","p2"]
builders = []
for p in projects:
    for slave in allslaves:
        name = p + "-" + slave
        builders.append(name)

# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}

####### BUILDSLAVES

# The 'slaves' list defines the set of recognized buildslaves. Each element is
# a BuildSlave object, specifying a unique slave name and password.  The same
# slave name and password must be configured on the slave.
from buildbot.buildslave import BuildSlave
c['slaves'] = []
for slave in allslaves:
    c['slaves'].append(BuildSlave(slave, "******"))

# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
# This must match the value configured into the buildslaves (with their
# --master option)
c['slavePortnum'] = 9989

####### CHANGESOURCES

# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes.

from buildbot.changes.gitpoller import GitPoller
c['change_source'] = []
c['change_source'].append(GitPoller(
        'git://github.com/parrot/parrot.git',
        workdir='gitpoller-parrot', 
        # branches=True for all branches only with buildbot master (0.9)
        branch='master',
        project='parrot',
        pollinterval=300))
c['change_source'].append(GitPoller(
        'git://github.com/perl6/nqp.git',
        workdir='gitpoller-nqp',
        branch='master',
        project='nqp',
        pollinterval=300))
c['change_source'].append(GitPoller(
        'git://github.com/rakudo/rakudo.git',
        workdir='gitpoller-rakudo',
        branch='nom',
        project='rakudo',
        pollinterval=300))
c['change_source'].append(GitPoller(
        'git://github.com/Perl/perl5.git',
        workdir='gitpoller-perl5',
        branch='blead',
        project='perl5',
        pollinterval=300))
c['change_source'].append(GitPoller(
        'git://github.com/perl11/p2.git',
        workdir='gitpoller-p2',
        branch='p2',
        project='p2',
        pollinterval=300))


####### SCHEDULERS

# Configure the Schedulers, which decide how to react to incoming changes.  In this
# case, just kick off a 'runtests' build

from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.changes import filter
c['schedulers'] = []
for p in projects:
    names = []
    for slave in allslaves:
        names.append(p + "-" + slave)
    c['schedulers'].append(SingleBranchScheduler(
        name=p,
        change_filter=filter.ChangeFilter(project=p,branch_re='.*'),
        treeStableTimer=None,
        builderNames=names))

c['schedulers'].append(ForceScheduler(
    name="force",
    builderNames=builders))

####### BUILDERS

# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which slaves can execute them.  Note that any particular build will
# only take place on one slave.

from buildbot.process.factory import BuildFactory
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand

factory = {}
p='parrot'
factory[p] = BuildFactory()
# check out the source
factory[p].addStep(Git(repourl='git://github.com/parrot/parrot.git', mode='incremental'))
#factory[p].addStep(ShellCommand(command=['git','clean','-dxf']))
factory[p].addStep(ShellCommand(command=["perl","Configure.pl","--optimize"]))
factory[p].addStep(ShellCommand(command=["make","-j4"]))
factory[p].addStep(ShellCommand(command=["make","-j4","fulltest"]))

p='nqp'
factory[p] = BuildFactory()
factory[p].addStep(Git(repourl='git://github.com/perl6/nqp.git', mode='incremental'))
#factory[p].addStep(ShellCommand(command=['git','clean','-dxf']))
#factory[p].addStep(ShellCommand(command=['rm','install/bin/parrot*','||','true']))
factory[p].addStep(ShellCommand(command=['make','clean']))
factory[p].addStep(ShellCommand(command=["perl","Configure.pl",
    "--gen-parrot=master","--backends=parrot"]))
# -j4 to be fixed with rotwang/parallel-make-gh152
factory[p].addStep(ShellCommand(command=["make","-j4"]))
factory[p].addStep(ShellCommand(command=["make","-j4","test"]))
#factory[p].addStep(ShellCommand(command=["make"]))
#factory[p].addStep(ShellCommand(command=["make","test"]))

p='rakudo'
factory[p] = BuildFactory()
factory[p].addStep(Git(repourl='git://github.com/rakudo/rakudo.git', mode='incremental'))
#factory[p].addStep(ShellCommand(command=['make','clean']))
#factory[p].addStep(ShellCommand(command=['git','clean','-dxf']))
factory[p].addStep(ShellCommand(command=["perl","Configure.pl",
    "--gen-parrot=master","--backends=parrot","--gen-nqp=master","--parrot-make-option='--jobs=4'"]))
factory[p].addStep(ShellCommand(command=["make"]))
factory[p].addStep(ShellCommand(command=["make","test"]))

p='perl5'
factory[p] = BuildFactory()
factory[p].addStep(Git(repourl='git://github.com/Perl/perl5.git', mode='incremental'))
factory[p].addStep(ShellCommand(command=['git','clean','-dxf']))
factory[p].addStep(ShellCommand(command=['sh','Configure','-de','-Dusedevel','-Doptimize=-Os']))
factory[p].addStep(ShellCommand(command=["make","-j4"]))
factory[p].addStep(ShellCommand(command=["make","-j4","test"]))

p='p2'
factory[p] = BuildFactory()
factory[p].addStep(Git(repourl='git://github.com/perl11/p2.git', mode='incremental'))
factory[p].addStep(ShellCommand(command=['git','clean','-dxf']))
factory[p].addStep(ShellCommand(command=['make','config']))
factory[p].addStep(ShellCommand(command=["make","-j4"]))
factory[p].addStep(ShellCommand(command=["make","-j4","test"]))

from buildbot.config import BuilderConfig

c['builders'] = []

for p in projects:
    for slave in allslaves:
        name = p+"-"+slave
        c['builders'].append(
            BuilderConfig(name=name,
                          slavenames=slave,
                          factory=factory[p]))

####### STATUS TARGETS

# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.

c['status'] = []

from buildbot.status import html
from buildbot.status.web import authz, auth

authz_cfg=authz.Authz(
    # change any of these to True to enable; see the manual for more
    # options
    auth=auth.BasicAuth([("******","******")]),
    gracefulShutdown = False,
    forceBuild = 'auth', # use this to test your slave once it is set up
    forceAllBuilds = False,
    pingBuilder = False,
    stopBuild = False,
    stopAllBuilds = False,
    cancelPendingBuild = False,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))

####### PROJECT IDENTITY

# the 'title' string will appear at the top of this buildbot
# installation's html.WebStatus home page (linked to the
# 'titleURL') and is embedded in the title of the waterfall HTML page.

c['title'] = "Perl VM"
c['titleURL'] = "http://parrot.org/"

# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.WebStatus page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out
# without some help.

c['buildbotURL'] = "https://perl514.cpanel.net:8010/"

####### DB URL

c['db'] = {
    # This specifies what database buildbot uses to store its state.  You can leave
    # this at its default for all but the largest installations.
    'db_url' : "sqlite:///state.sqlite",
}

About Reini Urban

user-pic Working at cPanel on cperl, B::C (the perl-compiler), parrot, B::Generate, cygwin perl and more guts, keeping the system alive.