taler-deployment

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

commit 8bed2bc4cf60f123c60c7656c31d45686577f335
parent 52421576edf6ed510b2e0c6c11111f19147837c5
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  4 Feb 2025 14:26:29 +0100

merge gnunet BB configuration into Taler BB

Diffstat:
Mbuildbot/README | 46+++++++++++++++++++++++++++++++++++++++++++++-
Mbuildbot/master.cfg | 663++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 702 insertions(+), 7 deletions(-)

diff --git a/buildbot/README b/buildbot/README @@ -1,4 +1,3 @@ - -- 10 JUNE 2020 Christian recently removed pip install of buildbot, replaced with debian repo version. @@ -29,3 +28,48 @@ Packages needed to use Buildbot 0.9.x. - buildbot-www - buildbot-waterfall-view - buildbot-console-view + +======= From GNUnet BB README ======== + + +== Enable CI for a repository + +In order to include a repository in the CI it must + +- be added to the buildmaster configuration and assigned to workers + that can actually build it (ask your admin) +- contain CI tasks in the ".buildmaster" directory. + +== CI/CD Tasks + +When a new commit is pushed, each assigned builder will be tasked to +execute the following scripts from the repository in question, in order, if +they exist: + +0. .buildbot/build.sh +1. .buildbot/install.sh +2. .buildbot/test.sh +3. .buildbot/deploy.sh + +If there is a worker-specific script found prefixed with "<workername>_" +the respective script overrides the "default" script. +Usually, you want the deploy script to only run on a specific worker. + +Example: + +.buildbot/build.sh +.buildbot/install.sh +.buildbot/specialworker_install.sh +.buildbot/deployhost_deploy.sh + +This will result in "build.sh" and "install.sh" to be executed on any worker. +But, "deployhost_deploy.sh" will only be executed on the worker "deployhost". +The worker "specialworker" will not execute "install.sh" but instead +"specialhost_install.sh". This script may omit any installation or modify the +functionality of the standard "install.sh". + +== Custom builds + +Buildbot is very configurable. If you need very specific build configurations +that requires functions only available in the buildmaster configuration, +please contact your admin. diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -88,6 +88,21 @@ class MessageFormatterWithStdout(reporters.MessageFormatter): ctx.update(dict(stdout="\n".join(stdout))) +##################################################### +# Commit message triggers # +# # +# This checks for triggers in the commit messages # +# !tarball will trigger a release build # +# !coverity will trigger a coverity check # +##################################################### +def checkForTarballTrigger(change): + if "!tarball" in change.comments: + return True + return False +def checkForCoverityTrigger(change): + if "!coverity" in change.comments: + return True + SERVICES = [] # The 'builders' list defines the Builders, which tell Buildbot @@ -139,6 +154,29 @@ def git_step(repo, target_branch="master"): branch=target_branch ) +# FIXME: document this function! +def add_default_step(bldr, step): + worker_script = ".buildbot/%(prop:workername)s_" + step + ".sh" + default_script = ".buildbot/" + step + ".sh" + cmd = '[ -f %s ] && ls -1 %s || exit 0' % (worker_script,worker_script) + bldr.addStep(steps.SetPropertyFromCommand(command=util.Interpolate(cmd), + hideStepIf=True, + property='buildbotScript_%s' % step, + name="Checking for worker-specific %s script" % step)) + cmd = '[ -f %s ] && ls -1 %s || exit 0' % (default_script,default_script) + bldr.addStep(steps.SetPropertyFromCommand(doStepIf=(util.Property('buildbotScript_%s' % step) != util.Interpolate(worker_script)), + hideStepIf=True, + command=util.Interpolate(cmd), + property='buildbotScript_%s' % step, + name="Checking for %s script" % step)) + bldr.addStep(steps.ShellCommand(command=util.Property('buildbotScript_%s' % step), + haltOnFailure=True, + doStepIf=(util.Property('buildbotScript_%s' % step) != None), + hideStepIf=lambda results, s: results==SKIPPED, + name="Executing %s step" % step)) + + + # Convenience function that runs 'make check' in a # directory of the code inside of a netjail. def jailed_check(package, srcdirs): @@ -385,6 +423,592 @@ SERVICES.append(reporters.MailNotifier( NIGHTLY_TRIGGERS.append("linkchecker-builder") +#################### +## GNUnet workers ## +#################### + +WORKERS.append(Worker("firefly-x86_64-amdepyc", "pass")) +WORKERS.append(Worker("mp-amd64-openbsd", "Tai7zeic")) +WORKERS.append(Worker("schanzen-aarch64-fedora-meson", "eWi9keet")) + + +SCHEDULERS.append(schedulers.AnyBranchScheduler( + name="gnunet", + change_filter=util.ChangeFilter(branch_re='master|dev/.+', + repository='https://git.gnunet.org/git/gnunet.git'), + treeStableTimer=None, + builderNames=["gnunet_autotools", "gnunet_meson"])) + +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="tagged_release", + change_filter=util.ChangeFilter(branch_re='.*v[0-9]*[.][0-9]*[.][0-9]*$', + repository='https://git.gnunet.org/git/gnunet.git'), + treeStableTimer=None, + builderNames=["gnunet_release"])) + + +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="tarball", + onlyImportant=True, + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gnunet.git'), + fileIsImportant=checkForTarballTrigger, + treeStableTimer=None, + builderNames=["gnunet_release"])) + + +# Build a tarball nightly +SCHEDULERS.append(schedulers.Nightly(name='nightly', + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gnunet.git'), + builderNames=['gnunet_release'], + onlyIfChanged=True, + hour=6, minute=0)) + +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="gnunet_cov", + onlyImportant=True, + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gnunet.git'), + fileIsImportant=checkForCoverityTrigger, + treeStableTimer=None, + builderNames=["gnunet_coverity"])) + +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="gnunet_rpm", + change_filter=util.ChangeFilter(branch='dev/schanzen/copr', + repository='https://git.gnunet.org/git/gnunet-rpm.git'), + treeStableTimer=None, + builderNames=["gnunet_rpm_copr"])) + + +# Schedule a coverity pass monthly +SCHEDULERS.append(schedulers.Nightly(name='nightly_cov', + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gnunet.git'), + builderNames=['gnunet_coverity'], + onlyIfChanged=True, + dayOfMonth=0, hour=3, minute=0)) + + + + +# +# WEBSITES +# +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="www_master_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/www.git'), + treeStableTimer=None, + builderNames=["stage.gnunet.org"])) + +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="www_stable_scheduler", + change_filter=util.ChangeFilter(branch='stable', + repository='https://git.gnunet.org/git/www.git'), + treeStableTimer=None, + builderNames=["www.gnunet.org"])) +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="bib_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gnunetbib.git'), + treeStableTimer=None, + builderNames=["bib.gnunet.org"])) +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="reclaim_www_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/www-reclaim.git'), + treeStableTimer=None, + builderNames=["reclaim.gnunet.org"])) +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="rest_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gnunet-rest-api.git'), + treeStableTimer=None, + builderNames=["rest.gnunet.org"])) +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="lsd_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository_re='https://git.gnunet.org/git/lsd.*'), + treeStableTimer=None, + builderNames=["lsd.gnunet.org"])) +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="gana_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gana.git'), + treeStableTimer=None, + builderNames=["gana.gnunet.org"])) +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="doc_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/gnunet-handbook.git'), + treeStableTimer=None, + builderNames=["doc.gnunet.org"])) + + +# +# Buildbot self-reconfigure +# +SCHEDULERS.append(schedulers.SingleBranchScheduler( + name="bb_reload_scheduler", + change_filter=util.ChangeFilter(branch='master', + repository='https://git.gnunet.org/git/buildbot-ci.git'), + treeStableTimer=None, + builderNames=["buildbot"])) + + + +def add_default_pipeline(bldr): + add_default_step(bldr, "build") + add_default_step(bldr, "install") + add_default_step(bldr, "test") + add_default_step(bldr, "deploy") + + +factory = util.BuildFactory() +factoryMeson = util.BuildFactory() +factoryWithDocs = util.BuildFactory() + + + +########################### +# GNUnet # +########################### +gnunet_make_step = steps.ShellSequence( + name=util.Interpolate("GNUnet build"), + env={'GNUNET_PREFIX': '/tmp/gnunet-buildbot/lib', + 'PATH': ["/tmp/gnunet-buildbot/bin", "${PATH}"], + 'TMPDIR': '/tmp/gnunet/'}, + haltOnFailure=True, + commands=[ + util.ShellArg(command=['./bootstrap'], logname='bootstrap', haltOnFailure=True), + util.ShellArg(command=['./configure', + "--prefix=/tmp/gnunet-buildbot", + "--enable-experimental", + "--enable-logging=verbose"], + logname='configure', + haltOnFailure=True), + util.ShellArg(command=['make'], + logname='make', + haltOnFailure=True), + util.ShellArg(command=['make', 'install'], + logname='make install', + haltOnFailure=True), + #util.ShellArg(command=['sudo', '/home/buildbot/bin/netjail.sh', 'bash', '-c', "'make check'"], + # logname='make check', + # warnOnFailure=True, + # flunkOnFailure=False), # make check has issues. + util.ShellArg(command=['make', 'uninstall'], + logname='make uninstall', + haltOnFailure=True)] +) + +gnunet_meson_step = steps.ShellSequence( + name=util.Interpolate("GNUnet build (meson)"), + env={'GNUNET_PREFIX': '/tmp/gnunet-buildbot/lib', + 'PATH': ["/tmp/gnunet-buildbot/bin", "${PATH}"], + 'TMPDIR': '/tmp/gnunet/'}, + haltOnFailure=True, + commands=[ + util.ShellArg(command=['./bootstrap', 'meson'], logname='bootstrap', haltOnFailure=True), + util.ShellArg(command=['meson', 'setup', + "-Dprefix=/tmp/gnunet-buildbot", + "-Dexperimental=true", + "-Dlogging=verbose", + "build"], + logname='setup', + haltOnFailure=True), + util.ShellArg(command=['meson', 'compile', '-C', 'build'], + logname='compile', + haltOnFailure=True), + util.ShellArg(command=['meson', 'install', '-C', 'build'], + logname='install', + haltOnFailure=True), + util.ShellArg(command=['ninja', 'uninstall', '-C', 'build'], + logname='ninja uninstall', + haltOnFailure=True)] +) + +gnunet_meson_build_steps = [ + steps.Git(repourl='https://git.gnunet.org/git/gnunet.git', + mode='full', method='fresh'), + gnunet_meson_step +] + +factoryMeson.addSteps(gnunet_meson_build_steps) + +gnunet_build_steps = [ + steps.Git(repourl='https://git.gnunet.org/git/gnunet.git', + mode='full', method='fresh'), + gnunet_make_step +] + +factory.addSteps(gnunet_build_steps) + +# The factory with doc deployment (only for firely) +factoryWithDocs.addSteps(gnunet_build_steps) + +# Add the deployment step +factoryWithDocs.addStep(steps.ShellCommand(command=['make', 'full'], + workdir=util.Interpolate('build/doc/doxygen'), + haltOnFailure=True, + name="Doxygen")) +factoryWithDocs.addStep(steps.ShellCommand(command=['make', 'html'], + workdir=util.Interpolate('build/doc'), + haltOnFailure=True, + name="HTML Documentation")) + +factoryWithDocs.addStep(steps.ShellSequence( + name=util.Interpolate("Deploy Doxygen"), + workdir=util.Interpolate('build/doc'), + commands=[ + util.ShellArg(command=['chmod', '-R', 'ag+rX', '../doc'], + logname='Permissions', + haltOnFailure=True), + util.ShellArg(command=['rsync', '-a', '--delete', + '--exclude', 'sphinx', + '../doc/', + 'handbook@firefly.gnunet.org:~/doc_deployment/'], + logname='Deploy', + haltOnFailure=True), + ])) + + +############################ +# COVERITY # +# Occurs: 1st day of month # +############################ +cov_factory = util.BuildFactory() +cov_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/gnunet.git', mode='full', method='fresh')) +cov_factory.addStep(steps.ShellSequence( + name=util.Interpolate("Git rev. %(prop:got_revision)s build"), + commands=[ + util.ShellArg(command=['./bootstrap'], logname='bootstrap'), + util.ShellArg(command=['./configure', + "--prefix=/tmp/gnunet-buildbot", + "--enable-testing", + "--enable-experimental"], logname="configure"), + util.ShellArg(command=['cov-build', '--dir', 'cov-int', 'make', '-j16'], logname='cov-build'), + ])) +cov_factory.addStep(steps.ShellCommand(command=['tar', 'czf', 'coverity.tar.gz', 'cov-int/'], + haltOnFailure=True, + name="Packing up")) +cov_factory.addStep(steps.ShellCommand(command=['curl', + '--form', util.Interpolate('token=%(secret:coverity_token)s'), + '--form', 'email=mschanzenbach@posteo.de', + '--form', 'version="git master"', + '--form', 'file=@./coverity.tar.gz', + '--form', 'description="Buildbot triggered build"', + 'https://scan.coverity.com/builds?project=GNUnet%2Fgnunet'], + haltOnFailure=True, + name="Sending")) + + +################################################# +# RELEASE BUILD # +# Occurs: # +# 1. Nightly # +# 2. Upon a pushed release tag (vX.Y.Z) # +# 3. With a commit message containing !tarball # +################################################# +dist_factory = util.BuildFactory() +# https://github.com/buildbot/buildbot/issues/6539 change to "copy" when fixed +dist_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/gnunet.git', mode='full', method='clobber')) + +# We do meson first, because autotools changes the source... +# There seems to be a meson bug where it thinks that the source was changed. +# So we add --allow-dirty anyway +dist_factory.addStep(steps.ShellSequence( + name=util.Interpolate("(Meson) Git rev. %(prop:got_revision)s build"), + haltOnFailure=True, + commands=[ + util.ShellArg(command=['./bootstrap', 'meson'], + logname='bootstrap', + haltOnFailure=True), + util.ShellArg(command=['meson', 'setup', 'build'], + logname='meson setup', + haltOnFailure=True), + util.ShellArg(command=['git', 'status'], + logname='status before dist', + haltOnFailure=True), + util.ShellArg(command=['meson', 'dist', + '-C', 'build', + '--no-tests'], + logname="dist", + haltOnFailure=True) + ])) + +# Get version number of tarball +cmdmeson = 'ls -1 build/meson-dist/gnunet-*.tar.xz | sed "s/build\/meson-dist\/gnunet-//" | sed "s/.tar.xz//" | tail -n1' +#cmd = 'git describe --tags | sed "s/^v//"' +dist_factory.addStep(steps.SetPropertyFromCommand(hideStepIf=False, + command=cmdmeson, + property='gnunet_meson_releasever', + name="(Meson) Getting release version")) +dist_factory.addStep(steps.ShellCommand(command=["tar", + "xf", + util.Interpolate('build/meson-dist/gnunet-%(prop:gnunet_meson_releasever)s.tar.xz'), + '-C', 'build'], + haltOnFailure=True, + name="Extracting tarball")) +# Try to build dist package +dist_factory.addStep(steps.ShellSequence( + workdir=util.Interpolate('build/build/gnunet-%(prop:gnunet_meson_releasever)s'), + name=util.Interpolate("(Meson) GNUnet %(prop:gnunet_meson_releasever)s tarball build"), + env={'GNUNET_PREFIX': '/tmp/gnunet-buildbot/lib', + 'PATH': ["/tmp/gnunet-buildbot/bin", "${PATH}"]}, + commands=[ + util.ShellArg(command=['mkdir', '-p', '$TMPDIR'],logname='tmpdir',haltOnFailure=True), + util.ShellArg(command=['meson', 'setup', + "-Dprefix=/tmp/gnunet-buildbot", + "-Dexperimental=true", + "-Dlogging=verbose", + "tarball_build"], + logname='setup', + haltOnFailure=True), + util.ShellArg(command=['meson', 'compile', '-C', 'tarball_build'], + logname='compile', + haltOnFailure=True), + util.ShellArg(command=['meson', 'install', '-C', 'tarball_build'], + logname='install', + haltOnFailure=True), + util.ShellArg(command=['ninja', 'uninstall', '-C', 'tarball_build'], + logname='ninja uninstall', + haltOnFailure=True)] + )) + + +dist_factory.addStep(steps.ShellSequence( + name=util.Interpolate("Git rev. %(prop:got_revision)s build"), + haltOnFailure=True, + commands=[ + util.ShellArg(command=['./bootstrap'], + logname='bootstrap', + haltOnFailure=True), + util.ShellArg(command=['./configure', + "--prefix=/tmp/gnunet-buildbot", + "--enable-experimental"], + logname="configure", + haltOnFailure=True), + util.ShellArg(command=['make', 'dist'], + logname='make dist', + haltOnFailure=True) + ])) + +# Get version number of tarball +cmd = 'ls -1 gnunet-*.tar.gz | sed "s/gnunet-//" | sed "s/.tar.gz//" | tail -n1' +#cmd = 'git describe --tags | sed "s/^v//"' +dist_factory.addStep(steps.SetPropertyFromCommand(hideStepIf=False, + command=cmd, + property='gnunet_releasever', + name="Getting release version")) +dist_factory.addStep(steps.ShellCommand(command=["tar", + "xvzpf", + util.Interpolate('gnunet-%(prop:gnunet_releasever)s.tar.gz')], + haltOnFailure=True, + name="Extracting tarball")) +# Try to build dist package +dist_factory.addStep(steps.ShellSequence( + workdir=util.Interpolate('build/gnunet-%(prop:gnunet_releasever)s'), + name=util.Interpolate("GNUnet %(prop:gnunet_releasever)s tarball build"), + env={'GNUNET_PREFIX': '/tmp/gnunet-buildbot/lib', + 'PATH': ["/tmp/gnunet-buildbot/bin", "${PATH}"]}, + commands=[ + util.ShellArg(command=['mkdir', '-p', '$TMPDIR'],logname='tmpdir',haltOnFailure=True), + util.ShellArg(command=['./configure', + "--prefix=/tmp/gnunet-buildbot", + "--enable-experimental"], + logname='configure', + haltOnFailure=True), + util.ShellArg(command=['make', '-j16'], + logname='make', + haltOnFailure=True), + util.ShellArg(command=['make', 'install'], + logname='make install', + haltOnFailure=True), + #util.ShellArg(command=['make', 'check'], + # logname='make check', + # warnOnFailure=True, flunkOnFailure=False), # make check has issues. + util.ShellArg(command=['make', 'uninstall'], + logname='make uninstall', + haltOnFailure=True), + ])) + + + +# Upload artifact to https://buildbot.gnunet.org/artifacts +dist_factory.addStep(steps.FileUpload(workersrc=util.Interpolate('gnunet-%(prop:gnunet_releasever)s.tar.gz'), + mode=0o644, + masterdest=util.Interpolate("~/artifacts/gnunet-%(prop:gnunet_releasever)s.tar.gz"), + url=util.Interpolate("https://buildbot.gnunet.org/artifacts/gnunet-%(prop:gnunet_releasever)s.tar.gz"))) +dist_factory.addStep(steps.FileUpload(workersrc=util.Interpolate('build/meson-dist/gnunet-%(prop:gnunet_meson_releasever)s.tar.xz'), + mode=0o644, + masterdest=util.Interpolate("~/artifacts/gnunet-%(prop:gnunet_releasever)s-meson.tar.xz"), + url=util.Interpolate("https://buildbot.gnunet.org/artifacts/gnunet-%(prop:gnunet_meson_releasever)s-meson.tar.xz"))) + + + + +########################### +# Fedora COPR build # +########################### +copr_factory = util.BuildFactory() +copr_factory.addStep(steps.ShellCommand(command=["curl", + "-H", "Content-Type: application/json", + "--data", "{}", + "-X", "POST", + "https://copr.fedorainfracloud.org/webhooks/custom/36992/d316c169-1482-4508-a765-cfb5c0efeb67/gnunet/"], + haltOnFailure=True, + name="Triggering Copr build")) + + +########################### +# stage.gnunet.org # +########################### +www_factory = util.BuildFactory() +www_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/www.git', mode='incremental')) +add_default_pipeline(www_factory) + +########################### +# www.gnunet.org # +########################### +www_stable_factory = util.BuildFactory() +www_stable_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/www.git', mode='incremental', branch='stable')) +add_default_pipeline(www_stable_factory) + +########################### +# bib.gnunet.org # +########################### +bib_factory = util.BuildFactory() +bib_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/gnunetbib.git', mode='incremental')) +add_default_pipeline(bib_factory) + + +########################### +# reclaim.gnunet.org # +########################### +reclaim_www_stable_factory = util.BuildFactory() +reclaim_www_stable_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/www-reclaim.git', mode='incremental', branch='master')) +add_default_pipeline(reclaim_www_stable_factory) + + +########################### +# rest.gnunet.org # +########################### +rest_factory = util.BuildFactory() +rest_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/gnunet-rest-api.git', mode='incremental', branch='master')) +add_default_pipeline(rest_factory) + +########################### +# lsd.gnunet.org # +########################### +lsd_factory = util.BuildFactory() +lsd_factory.addStep(steps.Git(repourl=util.Property('repository'), mode='full', method="fresh", branch='master')) +add_default_pipeline(lsd_factory) + +########################### +# gana.gnunet.org # +########################### +gana_factory = util.BuildFactory() +gana_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/gana.git', mode='full', method="fresh", branch='master')) +add_default_pipeline(gana_factory) + +############################## +# doc.gnunet.org (Doc-NG) # +############################## +doc_factory = util.BuildFactory() +doc_factory.addStep(steps.Git(repourl='https://git.gnunet.org/git/gnunet-handbook.git', alwaysUseLatest=True, mode='full', method="clobber", branch='master')) +add_default_pipeline(doc_factory) + + + +########################### +# Buildbot # +########################### +bb_factory = util.BuildFactory() +bb_factory.addStep(steps.Git(repourl='ssh://git@git.gnunet.org/buildbot-ci.git', mode='incremental')) +bb_factory.addStep(steps.ShellCommand(command=["./reload_bb-master.sh"], name="Reload configuration")) + + + +BUILDERS.append( + util.BuilderConfig(name="gnunet_autotools", + workernames=["firefly-x86_64-amdepyc"], + factory=factory)) +BUILDERS.append( + util.BuilderConfig(name="gnunet_openbsd", + workernames=["mp-amd64-openbsd"], + factory=factory)) +BUILDERS.append( + util.BuilderConfig(name="gnunet_meson", + workernames=["schanzen-aarch64-fedora-meson"], + factory=factoryMeson)) + + +BUILDERS.append( + util.BuilderConfig(name="gnunet_release", + workernames=["firefly-x86_64-amdepyc"], + factory=dist_factory)) +BUILDERS.append( + util.BuilderConfig(name="gnunet_coverity", + workernames=["firefly-x86_64-amdepyc"], + factory=cov_factory)) + + +BUILDERS.append( + util.BuilderConfig(name="stage.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=www_factory)) +BUILDERS.append( + util.BuilderConfig(name="www.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=www_stable_factory)) +BUILDERS.append( + util.BuilderConfig(name="bib.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=bib_factory)) +BUILDERS.append( + util.BuilderConfig(name="reclaim.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=reclaim_www_stable_factory)) +BUILDERS.append( + util.BuilderConfig(name="rest.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=rest_factory)) +BUILDERS.append( + util.BuilderConfig(name="lsd.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=lsd_factory)) +BUILDERS.append( + util.BuilderConfig(name="gana.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=gana_factory)) +BUILDERS.append( + util.BuilderConfig(name="doc.gnunet.org", + workernames=["firefly-x86_64-amdepyc"], + factory=doc_factory)) +BUILDERS.append( + util.BuilderConfig(name="buildbot", + workernames=["firefly-x86_64-amdepyc"], + factory=bb_factory)) +BUILDERS.append( + util.BuilderConfig(name="gnunet_rpm_copr", + workernames=["firefly-x86_64-amdepyc"], + factory=copr_factory)) + + +bsg = reporters.BuildStatusGenerator(mode=["exception", "failing", "problem"]) + +mn = reporters.MailNotifier(fromaddr="buildbot@firefly.gnunet.org", + sendToInterestedUsers=False, + extraRecipients=["gnunet-ci@gnunet.org"], + lookup="gnunet.org", + generators=[bsg]) +SERVICES.append(mn) + + + ############################################# # 19: CONTAINER FACTORY ##################### @@ -700,6 +1324,24 @@ SCHEDULERS.append(schedulers.ForceScheduler( builderNames=list(BUILDER_LIST) )) +SCHEDULERS.append(schedulers.ForceScheduler( + name="force_gnunet", + buttonName="Trigger build", + builderNames=["gnunet_openbsd", + "gnunet_meson", + "gnunet_autotools", + "gnunet_release", + "gnunet_coverity", + "stage.gnunet.org", + "www.gnunet.org", + "bib.gnunet.org", + "rest.gnunet.org", + "lsd.gnunet.org", + "gana.gnunet.org", + "doc.gnunet.org", + "reclaim.gnunet.org", + "buildbot", + "gnunet_rpm_copr"])) ######################################################### ####### Actual configuation initialization ############## @@ -708,6 +1350,10 @@ SCHEDULERS.append(schedulers.ForceScheduler( # This is the dictionary that the buildmaster pays attention to. We also use # a shorter alias to save typing. c = BuildmasterConfig = {} + +# Secrets +c['secretsProviders'] = [secrets.SecretInAFile(dirname="~/secrets")] + c["workers"] = WORKERS c["builders"] = BUILDERS c["schedulers"] = SCHEDULERS @@ -716,8 +1362,12 @@ c["services"] = SERVICES # Silence warning and allow very basic phoning home. c["buildbotNetUsageData"] = "basic" -c["title"] = "GNU Taler" -c["titleURL"] = "https://taler.net" +c["title"] = "GNUnet and GNU Taler Builder" +c["titleURL"] = "https://buildbot.gnunet.org" + +# the 'buildbotURL' string should point to the location where the buildbot's +# internal web server is visible. +c['buildbotURL'] = "https://buildbot.gnunet.org/" # This specifies what database buildbot uses to store its # state. You can leave this at its default for all but the @@ -737,7 +1387,7 @@ pollGnunetSource = changes.GitPoller(repourl='https://git.gnunet.org/gnunet.git' pollInterval=300, pollAtLaunch=True, project="gnunet") -c["change_source"] = [pollGnunetSource, pbSource] +c["change_source"] = [pollGnunetSource, pbSource, pbSource2] # 'protocols' contains information about protocols which master # will use for communicating with workers. You must define at @@ -746,9 +1396,9 @@ c["change_source"] = [pollGnunetSource, pbSource] # the workers (with their --master option) c["protocols"] = {"pb": {"port": "tcp:19989:interface=127.0.0.1"}} -# We use nginx to expose the BB under this URL. -c["buildbotURL"] = "https://buildbot.taler.net/" - +# Load admin password +with open("~/secrets/admin") as fh: + www_pass = fh.read().strip() # minimalistic config to activate new web UI # -- formerly commented out as not packaged properly in Debian and others, see @@ -761,6 +1411,7 @@ c["www"] = { "console_view": True, "grid_view": True, }, + "auth": util.UserPasswordAuth([('admin',www_pass)]) "allowed_origins": ["https://*.taler.net"], "avatar_methods": [], }