taler-deployment

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

commit e4ec6b55d482a4b7259d1549fb86bb3e743bad6b
parent d14af8c19c7b70e4ca5e0d64dc9e0118e3a32e64
Author: buckE <buckE@disroot.org>
Date:   Tue, 16 Jun 2020 05:09:33 +0000

linkchecker additions

Diffstat:
Abootstrap-linkchecker | 37+++++++++++++++++++++++++++++++++++++
Mbuildbot/linkchecker.sh | 3+++
Mbuildbot/master.cfg | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 99 insertions(+), 2 deletions(-)

diff --git a/bootstrap-linkchecker b/bootstrap-linkchecker @@ -0,0 +1,37 @@ +#!/bin/bash + +# Bootstrap the Taler setup for the user account that +# is currently logged in. + +# Generates a setup for a single user, +# including a postgresql DB. + +set -eu + +BRANCH=master +REPOS="deployment" + +cd $HOME + +for component in $REPOS; do + if ! test -d $HOME/$component; then + git clone git://git.taler.net/$component.git + fi +done + +for component in $REPOS; do + echo "Checking out $component to $BRANCH" + git -C $HOME/$component checkout $BRANCH +done + +if [[ ! -d worker ]]; then + buildbot-worker create-worker --umask=0o22 ~/worker 127.0.0.1 linkchecker-worker linkchecker-pass +fi + +#mkdir -p ~/.config/systemd/user/ +#cp systemd-services/buildbot-worker-doc.service ~/.config/systemd/user/ + +#systemctl --user daemon-reload || echo "Please use 'machinectl shell docbuilder@.host' to log in to use this script" + +#systemctl --user enable buildbot-worker-linkchecker.service +#systemctl --user start buildbot-worker-linkchecker.service diff --git a/buildbot/linkchecker.sh b/buildbot/linkchecker.sh @@ -5,6 +5,9 @@ ## This script will scan www.taler.net for broken links and e-mail a copy of the log if any are found. +# For debug: +touch /home/linkchecker/scriptRan + logfile="linkchecker.log" # Remove old log diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -105,7 +105,12 @@ c["workers"] = [ ## # testing buildbot using the "buildslavetest" user (for no specific reason except it exists) # connects to `buidlslavetest` @ taler.net - worker.Worker("buildslavetest-worker", "Gei8naiyox4uuhoo") + worker.Worker("buildslavetest-worker", "Gei8naiyox4uuhoo"), + + ## + # linkchecker worker checks for dead links in the Website + # Home: linkchecker@taler.net + worker.Worker("linkchecker-worker", linkchecker-worker-pass") ] # 'protocols' contains information about protocols which master @@ -131,7 +136,7 @@ c["change_source"] = [ALLCS] # changes. # Run at 11am every day. -TEST_SCHEDULER = schedulers.SingleBranchScheduler( +TEST_SCHEDULER = schedulers.Nightly( name="test-scheduler", builderNames=["buildslavetest-builder"], branch="master", @@ -925,6 +930,7 @@ TALER_DEMO_HEALTHCHECK_BUILDER = util.BuilderConfig( ) c["builders"] = [ + LINKCHECKER_BUILDER, BUILDMASTER_BUILDER, LCOV_BUILDER, CHECKER_BUILDER, @@ -1073,3 +1079,54 @@ c["db"] = { # largest installations. "db_url": "sqlite:///state.sqlite", } + + + +########################################################################################### +# ------------- NEW FORMATTING STARTS HERE FOR NEW AND MODIFIED PROJECTS ----------------- + +# Best Practices: Group by worker as: +# - comment for worker location (ex: "Find worker at: xyz shell account non taler.net") +# - SCHEDULER +# - BUILDER function +# - FACTORY function +# +# NOTE: WORKER must be defined above, in "c["workers"] = [" list +# + +### --- linkchecker --- + +# linkchecker WORKER Location: linkchecker@taler.net + +# linkchecker SCHEDULER +# Run at 7:30am every day. +LINKCHECKER_SCHEDULER = schedulers.Nightly( + name="linkchecker-scheduler", + builderNames=["linkchecker-builder"], + branch="master", + hour=7, + minute=30 +) + +# linkchecker BUILDER +# Builder for linkchecker +BUILDMASTER_BUILDER = util.BuilderConfig( + name="linkchecker-builder", + workernames=["linkchecker-worker"], + factory=LINKCHECKER_FACTORY +) + +# linkchecker FACTORY +LINKCHECKER_FACTORY = create_factory_with_deployment() +LINKCHECKER_FACTORY.addStep( + ShellCommand( + name="linkchecker", + description="Check taler.net website for broken links && Notify", + descriptionDone="linkchecker links checked", + command=["./linkchecker.sh"], + workdir="../../deployment/buildbot", + haltOnFailure=True + ) +) + +### /end --- linkchecker ---