From 7ac8b668b416081ad08085697344eeb46a1b0820 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Apr 2016 14:04:03 +0200 Subject: fournier's bb config --- buildbot/master.cfg | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 buildbot/master.cfg (limited to 'buildbot') diff --git a/buildbot/master.cfg b/buildbot/master.cfg new file mode 100644 index 0000000..bff0443 --- /dev/null +++ b/buildbot/master.cfg @@ -0,0 +1,174 @@ +# -*- python -*- +# ex: set syntax=python: + +c = BuildmasterConfig = {} + +tmp = "/tmp/taler-mint" + +####### BUILDSLAVES + +from buildbot.buildslave import BuildSlave +c['slaves'] = [BuildSlave("simpleSlave", "taler"), + BuildSlave("arch-x86_64", "taler")] + +slaveNames = ["simpleSlave", + "arch-x86_64"] + +c['protocols'] = {'pb': {'port': 9989}} + +####### CHANGESOURCES + + +from buildbot.changes.gitpoller import GitPoller +c['change_source'] = [] +c['change_source'].append(GitPoller( + 'git://git.taler.net/mint.git', + workdir='gitpoller-workdir', branch='master', + pollinterval=300)) + +####### SCHEDULERS + +from buildbot.schedulers.basic import SingleBranchScheduler, Dependent +from buildbot.schedulers.forcesched import * +from buildbot.changes import filter + +c['schedulers'] = [] +git = SingleBranchScheduler( + name="mint-commit", + reason="Commit pushed to the git repository", + change_filter=filter.ChangeFilter(branch='master'), + treeStableTimer=600, + builderNames=["mint-build"]) + +force = ForceScheduler( + name="force-build", + revision=FixedParameter(name="revision", default=""), + repository=FixedParameter(name="repository", default=""), + project=FixedParameter(name="project", default=""), + builderNames=["mint-build","mint-perf"]) + +successful = Dependent( + name="mint-perf", + upstream=git, + builderNames=["mint-perf"]) + +c['schedulers'] = [git, force, successful] + +####### BUILDERS + +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 + + + +# Compilation, installation and tests of Taler +mintBuild = BuildFactory() +mintBuild.addStep(Git(repourl='git://git.taler.net/mint.git', mode='full', method = 'fresh')) +mintBuild.addStep(ShellCommand( + name="bootstrap", + description="bootstraping", + descriptionDone="bootstraped", + command=["./bootstrap"], + hideStepIf=True)) +mintBuild.addStep(Configure(command=["./configure", "--prefix="+tmp])) +mintBuild.addStep(Compile(command=["make"])) +mintBuild.addStep(ShellCommand(name="Install", + description="Installing", + command=["make", "install"])) +# Starting from a clean database +mintBuild.addStep(ShellCommand(name="Drop database", + command=["psql", "-c", "DROP DATABASE talercheck"], + hideStepIf=True, + flunkOnFailure=False)) +mintBuild.addStep(ShellCommand(name="Create database", + command=["psql", "-c", "CREATE DATABASE talercheck"], + hideStepIf=True)) +# run the tests +mintBuild.addStep(Test(command=["make","check"], + env={'PATH':tmp + "/bin:" + os.environ['PATH']})) + +# running the performence tests for Taler +mintPerf = BuildFactory() + +# compile +mintPerf.addStep(Git(repourl='git://git.taler.net/mint.git', + mode='full', + method = 'fresh')) +mintPerf.addStep(ShellCommand( + name="bootstrap", + description="bootstraping", + descriptionDone="bootstraped", + command=["./bootstrap"], + hideStepIf=True)) +mintPerf.addStep(Configure(command=["./configure", "--prefix="+tmp])) +mintPerf.addStep(Compile(command=["make"])) +mintPerf.addStep(Compile(command=["make","-C","src/mintdb/","perf-mintdb"])) + +# create the database anew +mintPerf.addStep(ShellCommand(name="Drop database", + command=["psql", + "-c", + "DROP DATABASE talercheck"], + hideStepIf=True)) +mintPerf.addStep(ShellCommand(name="Create database", + command=["psql", + "-c", + "CREATE DATABASE talercheck"], + hideStepIf=True)) + +# Run the performance tests +mintPerf.addStep(ShellCommand(name="perf-measure", + description="measuring", + descriptionDone="measured", + command=["./perf-mintdb"], + workdir="build/src/mintdb", + timeout=None)) + +from buildbot.config import BuilderConfig + +c['builders'] = [] +c['builders'].append( + BuilderConfig(name="mint-build", + slavenames=slaveNames, + factory=mintBuild)) + +c['builders'].append( + BuilderConfig(name="mint-perf", + slavenames=slaveNames, + factory=mintPerf)) + +####### STATUS TARGETS + +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([("nfournier","taler")]), + 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 +c['title'] = "Taler" +c['titleURL'] = "http://taler.net" + +c['buildbotURL'] = "http://buildbot.taler.net" + +####### DB URL +c['db'] = { + 'db_url' : "sqlite:///state.sqlite", +} -- cgit v1.2.3