Skip to content

Instantly share code, notes, and snippets.

@kamituel
Last active December 11, 2015 09:18
Show Gist options
  • Save kamituel/4579150 to your computer and use it in GitHub Desktop.
Save kamituel/4579150 to your computer and use it in GitHub Desktop.
Buildbot's master.cfg for B2G/unagi
# -*- python -*-
# ex: set syntax=python:
c = BuildmasterConfig = {}
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("example-slave", "pass")]
c['slavePortnum'] = 9989
from buildbot.changes.gitpoller import GitPoller
c['change_source'] = []
c['change_source'].append(GitPoller(
'git://github.com/mozilla-b2g/B2G.git',
workdir='gitpoller-workdir', branch='master',
pollinterval=300))
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.schedulers import timed
from buildbot.changes import filter
c['schedulers'] = []
c['schedulers'].append(ForceScheduler(name="force", builderNames=["all"]))
c['schedulers'].append(timed.Nightly(name='nightly', builderNames=['all'], branch='master', hour=range(0, 24, 4), minute=0))
from buildbot.process.factory import BuildFactory
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand
factory = BuildFactory()
factory.addStep(Git(repourl='git://github.com/mozilla-b2g/B2G.git', mode='incremental'))
# Option 1: Unagi build
factory.addStep(ShellCommand(command="cp ../../../Adreno200-AU_LINUX_ANDROID_ICS_CHOCO_CS.04.00.03.06.001.zip ./ && unzip -o Adren*zip"))
factory.addStep(ShellCommand(command="cp ../../../backup-unagi.tar ./ && tar -xf backup-unagi.tar"))
factory.addStep(ShellCommand(env={'PATH':'/opt/gcc-4.4.7/bin/:${PATH}'}, command="echo y | ./config.sh unagi", usePTY=True))
# Option 2: Emulator build
# factory.addStep(ShellCommand(env={'PATH':'/opt/gcc-4.4.7/bin/:${PATH}'}, command="echo y | ./config.sh emulator", usePTY=True))
factory.addStep(ShellCommand(env={'PATH':'/opt/gcc-4.4.7/bin/:${PATH}'}, command="./build.sh", usePTY=True))
from buildbot.config import BuilderConfig
c['builders'] = []
c['builders'].append(
BuilderConfig(name="all",
slavenames=["example-slave"],
factory=factory))
c['status'] = []
from buildbot.status import html
from buildbot.status.web import authz, auth
authz_cfg=authz.Authz(
gracefulShutdown = False,
forceBuild = True,
forceAllBuilds = True,
pingBuilder = True,
stopBuild = True,
stopAllBuilds = True,
cancelPendingBuild = True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
c['title'] = "B2G"
c['titleURL'] = "http://example.com"
c['buildbotURL'] = "http://localhost:8010/"
c['db'] = {
'db_url' : "sqlite:///state.sqlite",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment