Last active
December 30, 2015 00:40
-
-
Save rutsky/72dc99c1a8715d37aff0 to your computer and use it in GitHub Desktop.
Buildbot test configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- python -*- | |
# ex: set syntax=python: | |
from buildbot.plugins import * | |
# This is a sample buildmaster config file. It must be installed as | |
# 'master.cfg' in your buildmaster's base directory. | |
# 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. | |
c['slaves'] = [ | |
buildslave.BuildSlave("example-slave", "pass"), | |
buildslave.BuildSlave("example-worker", "pass"), | |
] | |
# 'protocols' contains information about protocols which master will use for | |
# communicating with slaves. You must define at least 'port' option that slaves | |
# could connect to your master with this protocol. | |
# 'port' must match the value configured into the buildslaves (with their | |
# --master option) | |
c['protocols'] = {'pb': {'port': 9989}} | |
####### CHANGESOURCES | |
# the 'change_source' setting tells the buildmaster how it should find out | |
# about source code changes. Here we point to the buildbot clone of pyflakes. | |
c['change_source'] = [] | |
c['change_source'].append(changes.GitPoller( | |
'git://github.com/buildbot/pyflakes.git', | |
workdir='gitpoller-workdir', branch='master', | |
pollinterval=300)) | |
####### SCHEDULERS | |
# Configure the Schedulers, which decide how to react to incoming changes. In this | |
# case, just kick off a 'runtests' build | |
c['schedulers'] = [] | |
c['schedulers'].append(schedulers.SingleBranchScheduler( | |
name="all", | |
change_filter=util.ChangeFilter(branch='master'), | |
treeStableTimer=None, | |
builderNames=["runtests"])) | |
c['schedulers'].append(schedulers.ForceScheduler( | |
name="force", | |
builderNames=["runtests"])) | |
####### 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. | |
factory = util.BuildFactory() | |
# check out the source | |
factory.addStep(steps.Git(repourl='git://github.com/buildbot/pyflakes.git', mode='incremental')) | |
# run the tests (note that this will require that 'trial' is installed) | |
factory.addStep(steps.ShellCommand(command=["trial", "pyflakes"])) | |
factory.addStep(steps.FileUpload("pyflakes/__init__.py", "/tmp/pyflakes_init.py")) | |
factory.addStep(steps.FileDownload("/tmp/pyflakes_init.py", "pyflakes_init.py")) | |
c['builders'] = [] | |
c['builders'].append( | |
util.BuilderConfig(name="runtests", | |
slavenames=["example-slave", "example-worker"], | |
factory=factory)) | |
####### 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, | |
# like IRC bots. | |
c['status'] = [] | |
####### PROJECT IDENTITY | |
# the 'title' string will appear at the top of this buildbot installation's | |
# home pages (linked to the 'titleURL'). | |
c['title'] = "Pyflakes" | |
c['titleURL'] = "https://launchpad.net/pyflakes" | |
# the 'buildbotURL' string should point to the location where the buildbot's | |
# internal web server is visible. This typically uses the port number set in | |
# the 'www' entry below, but with an externally-visible host name which the | |
# buildbot cannot figure out without some help. | |
c['buildbotURL'] = "http://localhost:8020/" | |
# minimalistic config to activate new web UI | |
c['www'] = dict(port=8020, | |
plugins=dict(waterfall_view={}, console_view={}), | |
) | |
####### 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", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment