diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-04-17 18:52:56 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-04-17 18:52:56 +0200 |
commit | 0fa4cd48aed45b097aea3004b9bf00919b278778 (patch) | |
tree | 0bd3678dd0b9d7be1f9e388af5ee91dde736cb97 /buildbot/demo-checker-master.cfg | |
parent | 103d02d10f4e381b77df291235f0a3c5a59ac61a (diff) | |
download | deployment-0fa4cd48aed45b097aea3004b9bf00919b278778.tar.gz deployment-0fa4cd48aed45b097aea3004b9bf00919b278778.tar.bz2 deployment-0fa4cd48aed45b097aea3004b9bf00919b278778.zip |
BB to check old demo
Diffstat (limited to 'buildbot/demo-checker-master.cfg')
-rw-r--r-- | buildbot/demo-checker-master.cfg | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/buildbot/demo-checker-master.cfg b/buildbot/demo-checker-master.cfg new file mode 100644 index 0000000..cdf87e2 --- /dev/null +++ b/buildbot/demo-checker-master.cfg @@ -0,0 +1,178 @@ +import re +from buildbot.steps.source.git import Git +from buildbot.steps.shell import ShellCommand +from buildbot.plugins import (reporters, + worker, + changes, + schedulers, + util) + +# 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 = {} + +# Silence warning and allow very basic phoning home. +c["buildbotNetUsageData"] = "basic" + +####### WORKERS + +# 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("demo-checker", "demo-pass")] + +# '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": "tcp:9989:interface=127.0.0.1"}} + +####### CHANGESOURCES + +# the 'change_source' setting tells the buildmaster how it should +# find out about source code changes. + +# NOTE: BB is bound to localhost +ALLCS = changes.PBChangeSource(user="allcs", passwd="allcs") + +c["change_source"] = [ALLCS] + +####### SCHEDULERS + +# Configure the Schedulers, which decide how to react to incoming +# changes. + +DEMO_SERVICES_CHECKER_SCHEDULER = schedulers.Periodic( + name="demo-services-checker-scheduler", + periodicBuildTimer=60*30, # 1/2 hour + builderNames=["demo-services-checker-builder"]) + + +# Provide "force" button in the web UI. To be removed in the +# future ? +FORCE_SCHEDULER = schedulers.ForceScheduler( + name="force-scheduler", + builderNames=[ + "demo-check-builder"]) + +c["schedulers"] = [ + DEMO_SERVICES_CHECKER_SCHEDULER, + FORCE_SCHEDULER] + +####### BUILDERS + +# 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. + +def git_step(repo): + return Git(repourl=repo, + mode="full", + method="fresh", + logEnviron=False, + alwaysUseLatest=True, + haltOnFailure=True, + branch="master") + +DEMO_SERVICES_CHECKER_FACTORY = util.BuildFactory() +DEMO_SERVICES_CHECKER_FACTORY.addStep(ShellCommand( + name="demo services checker", + description="Checking demo services are online", + descriptionDone="Demo services are online!.", + # a symlink to a nonupdated deployment checkout. + command=["$HOME/demo-oldchecks.sh"], + workdir="build/buildbot", + haltOnFailure=True) + +DEMO_SERVICES_CHECKER_BUILDER = util.BuilderConfig( + name="demo-services-checker-builder", + workernames="demo-worker", + factory=DEMO_SERVICES_CHECKER_FACTORY) + +c["builders"] = [ + DEMO_SERVICES_CHECKER_BUILDER] + +####### BUILDBOT SERVICES + +# '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. + +EMAIL = reporters.MailNotifier( +fromaddr="testbuild@taler.net", +sendToInterestedUsers=False, +# notify from pass to fail, and viceversa. +mode=("change"), +builders=("demo-services-checker-builder"), + extraRecipients=["demo-feedback@taler.net"], + subject="Demo down.") + +c["services"] = [IRC, EMAIL] + +####### PROJECT IDENTITY + +c["title"] = "Taler" +c["titleURL"] = "https://taler.net" + +# We use nginx to expose the BB under this URL. +c["buildbotURL"] = "https://buildbot.taler.net/" + +from taler_bb_userpass_db import USER_PASSWORD_DB + +BUILDER_LIST = ["demo-services-checker-builder"] + +authz = util.Authz( + allowRules=[ + util.ForceBuildEndpointMatcher( + role="admins", + builder=b) for b in BUILDER_LIST] + + [util.StopBuildEndpointMatcher( + role="admins", + builder=b) for b in BUILDER_LIST] + + [util.RebuildBuildEndpointMatcher( + role="admins", + builder=b) for b in BUILDER_LIST] + + [util.ForceBuildEndpointMatcher( + role="norole", + builder=b) for b in BUILDER_LIST] + + [util.StopBuildEndpointMatcher( + role="norole", + builder=b) for b in BUILDER_LIST] + + [util.RebuildBuildEndpointMatcher( + role="norole", + builder=b) for b in BUILDER_LIST], + roleMatchers=[ + util.RolesFromUsername(roles=["admins"], + usernames=["marcello", + "florian", + "christian"])]) + +# minimalistic config to activate new web UI +c["www"] = { + "port": 8010, + "plugins" : { + "waterfall_view": {}, + "console_view":{}}, + "allowed_origins": ["https://*.taler.net"], + "avatar_methods": [], + "auth": util.UserPasswordAuth(USER_PASSWORD_DB), + "authz": authz} + +####### 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", +} |