taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 047be5cde81302b375c03e577a148d7ed2f24cd3
parent 7c3ed411931a397e573874e537d837827a84eb44
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Fri, 17 Feb 2017 10:43:54 +0100

Restarting Buildbot config from scratch

Diffstat:
Mbuildbot/master.cfg | 314++++++++++++++++---------------------------------------------------------------
1 file changed, 63 insertions(+), 251 deletions(-)

diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -1,292 +1,104 @@ # -*- python -*- -# ex: set syntax=python: +# ex: set filetype=python: -# This is a sample buildmaster config file. It must be installed as -# 'master.cfg' in your buildmaster's base directory (although the filename -# can be changed with the --basedir option to 'mktap buildbot master'). +from buildbot.plugins import * -# It has one job: define a dictionary named BuildmasterConfig. This -# dictionary has a variety of keys to control different aspects of the -# buildmaster. They are documented in docs/config.xhtml . +# 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 = {} -c['buildbotNetUsageData'] = None - -####### BUILDSLAVES +####### WORKERS -# the 'slaves' list defines the set of allowable buildslaves. Each element is -# a tuple of bot-name and bot-password. These correspond to values given to -# the buildslave's mktap invocation. -from buildbot.worker import Worker -c['workers'] = [Worker("lcovSlave", "taler"), - Worker("containersSlave", "taler")] +# The 'workers' list defines the set of recognized workers. Each element is +# a Worker object, specifying a unique worker name and password. The same +# worker name and password must be configured on the worker. +c['workers'] = [worker.Worker("example-worker", "pass")] -# to limit to two concurrent builds on a slave, use -# c['workers'] = [Worker("bot1name", "bot1passwd", max_builds=2)] - - -# 'slavePortnum' defines the TCP port to listen on. This must match the value -# configured into the buildslaves (with their --master option) - -c['protocols'] = { - 'pb': { - 'port': 9989 - } -} +# 'protocols' contains information about protocols which master will use for +# communicating with workers. You must define at least 'port' option that workers +# could connect to your master with this protocol. +# 'port' must match the value configured into the workers (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. Any class which implements IChangeSource can be -# put here: there are several in buildbot/changes/*.py to choose from. - -from buildbot.changes.pb import PBChangeSource -from buildbot.changes.gitpoller import GitPoller -c['change_source'] = [ - PBChangeSource(), - - GitPoller(repourl="https://git.taler.net/wallet-webex.git", branch="master", project="wallet-webex", pollInterval=600, pollAtLaunch=True), - GitPoller(repourl="https://git.taler.net/exchange.git", branch="master", project="exchange", pollInterval=600, pollAtLaunch=True), - GitPoller(repourl="https://git.taler.net/merchant.git", branch="master", project="merchant", pollInterval=600, pollAtLaunch=True), -] - -# For example, if you had CVSToys installed on your repository, and your -# CVSROOT/freshcfg file had an entry like this: -#pb = ConfigurationSet([ -# (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)), -# ]) - -# then you could use the following buildmaster Change Source to subscribe to -# the FreshCVS daemon and be notified on every commit: -# -#from buildbot.changes.freshcvs import FreshCVSSource -#fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar") -#c['change_source'] = fc_source - -# or, use a PBChangeSource, and then have your repository's commit script run -# 'buildbot sendchange', or use contrib/svn_buildbot.py, or -# contrib/arch_buildbot.py : -# -#from buildbot.changes.pb import PBChangeSource -#c['change_source'] = PBChangeSource() +# 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 - -from buildbot.schedulers.basic import SingleBranchScheduler -from buildbot.scheduler import Scheduler -from buildbot.plugins import util +# 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(SingleBranchScheduler(name="wallet-webex", - treeStableTimer=30*60, - change_filter=util.ChangeFilter(project="wallet-webex", branch="master"), - builderNames=[ - "selenium" -])) - -c['schedulers'].append(SingleBranchScheduler(name="exchange", - treeStableTimer=30*60, - change_filter=util.ChangeFilter(project="exchange", branch="master"), - builderNames=[ - "lcov-build" -])) - -c['schedulers'].append(SingleBranchScheduler(name="merchant", - treeStableTimer=30*60, - change_filter=util.ChangeFilter(project="merchant", branch="master"), - builderNames=[ - "lcov-build" -])) - - -from buildbot.schedulers.forcesched import ForceScheduler -c['schedulers'].append(ForceScheduler( - name="force", - builderNames=[ - "selenium", - "lcov-build" -])) - +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. Each one is configured with a -# dictionary, using the following keys: -# name (required): the name used to describe this bilder -# slavename (required): which slave to use, must appear in c['bots'] -# builddir (required): which subdirectory to run the builder in -# factory (required): a BuildFactory to define how the build is run -# periodicBuildTime (optional): if set, force a build every N seconds - -# buildbot/process/factory.py provides several BuildFactory classes you can -# start with, which implement build processes for common targets (GNU -# autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the -# base class, and is configured with a series of BuildSteps. When the build -# is run, the appropriate buildslave is told to execute each Step in turn. - -# the first BuildStep is typically responsible for obtaining a copy of the -# sources. There are source-obtaining Steps in buildbot/steps/source.py for -# CVS, SVN, and others. - -## TALER -from buildbot.process.factory import BuildFactory -from buildbot.steps.source.git import Git -from buildbot.steps.shell import ShellCommand -from buildbot.steps.shell import Configure -from buildbot.steps.shell import Compile -from buildbot.steps.shell import Test -import os +# The 'builders' list defines the Builders, which tell Buildbot how to perform a build: +# what steps, and which workers can execute them. Note that any particular build will +# only take place on one worker. -lcov = BuildFactory() -lcov.addStep(Git(repourl='git://git.taler.net/deployment.git', - mode='full', - method='fresh', - alwaysUseLatest=True, - haltOnFailure=True, - branch='master')) -lcov.addStep(ShellCommand(name="invalidation", - description="Invalidating timestamps", - descriptionDone="timestamps invalidated", - command=["./invalidate.sh"], - workdir="build/taler-build")) -lcov.addStep(ShellCommand(name="builder", - description="Compiling..", - descriptionDone="lcov files generated", - command=["make", "lcov"], - workdir="build/taler-build", - env={'PATH': "${HOME}/local/bin:${PATH}", - 'TALER_CHECKDB' : "postgresql:///talercheck?host=/home/${USER}/sockets"})) +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"])) -selenium_factory = BuildFactory() -selenium_factory.addStep(ShellCommand(name="clicker", - description="Performing demo", - descriptionDone="Demo finished", - command=["launch_selenium_test"], - env={'PATH': "${HOME}/local/bin:${PATH}"})) +c['builders'] = [] +c['builders'].append( + util.BuilderConfig(name="runtests", + workernames=["example-worker"], + factory=factory)) -lcov_builder = {"name": "lcov-build", - "workername": "lcovSlave", - # "builddir": ???, - "factory": lcov} +####### BUILDBOT SERVICES -selenium_builder = {"name": "selenium", - "workername": "containersSlave", - # "builddir": ???, - "factory": selenium_factory} - -c['builders'] = [lcov_builder, selenium_builder] -## END-TALER - - -####### 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([ -# ("team","gnunet"), -# ("lrn", "kyU,nBn,kbeO"), -# ]), -# gracefulShutdown = False, -# forceBuild = 'auth', -# forceAllBuilds = True, #'auth', -# pingBuilder = 'auth', -# stopBuild = 'auth', -# stopAllBuilds = 'auth', -# cancelPendingBuild = 'auth',) - -#c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg)) - -# from buildbot.status import mail -# c['status'].append(mail.MailNotifier(fromaddr="buildbot@localhost", -# extraRecipients=["builds@example.com"], -# sendToInterestedUsers=False)) -# - -#from buildbot.status import words -#c['status'].append(words.IRC(host="irc.freenode.net", nick="gnunet-bb", -# channels=["#gnunet"])) - -# from buildbot.status import client -# c['status'].append(client.PBListener(9988)) - -c['www'] = { - 'port': 8010, - 'plugins': { - 'console_view': {}, - 'waterfall_view': {}, # 'num_builds': 50 - }, - 'auth': util.UserPasswordAuth({ - "marcello.stanisci@inria.fr": "taler"}), -} +# 'services' is a list of BuildbotService items like reporter targets. The +# status of each build will be pushed to these targets. buildbot/reporters/*.py +# has a variety to choose from, like IRC bots. c['services'] = [] -from buildbot.plugins import reporters -irc = reporters.IRC("irc.eu.freenode.net", "taler-bb", - useColors=False, - channels=[{"channel": "#taler"}], - #password="mysecretnickservpassword", - notify_events={ - 'exception': 1, - 'successToFailure': 1, - 'failureToSuccess': 1, - }) -c['services'].append(irc) - -####### DEBUGGING OPTIONS - -# if you set 'debugPassword', then you can connect to the buildmaster with -# the diagnostic tool in contrib/debugclient.py . From this tool, you can -# manually force builds and inject changes, which may be useful for testing -# your buildmaster without actually commiting changes to your repository (or -# before you have a functioning 'sources' set up). The debug tool uses the -# same port number as the slaves do: 'slavePortnum'. - -#c['debugPassword'] = "f1955c29e336834e88476f74c1825cdb" - -# if you set 'manhole', you can ssh into the buildmaster and get an -# interactive python shell, which may be useful for debugging buildbot -# internals. It is probably only useful for buildbot developers. You can also -# use an authorized_keys file, or plain telnet. -#from buildbot import manhole -#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1", -# "admin", "password") - - ####### PROJECT IDENTITY -# the 'projectName' string will be used to describe the project that this -# buildbot is working on. For example, it is used as the title of the -# waterfall HTML page. The 'projectURL' string will be used to provide a link -# from buildbot HTML pages to your project's home page. +# the 'title' string will appear at the top of this buildbot installation's +# home pages (linked to the 'titleURL'). -c['projectName'] = "Taler" -c['projectURL'] = "https://taler.net/" +c['title'] = "Taler" +c['titleURL'] = "https://taler.net" # the 'buildbotURL' string should point to the location where the buildbot's -# internal web server (usually the html.Waterfall 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. +# 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'] = "https://buildbot.taler.net/" +c['buildbotURL'] = "http://localhost:8010/" + +# minimalistic config to activate new web UI +c['www'] = dict(port=8010, + 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", }