[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-deployment] branch master updated: BB to check old d
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-deployment] branch master updated: BB to check old demo |
Date: |
Wed, 17 Apr 2019 18:53:06 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 0fa4cd4 BB to check old demo
0fa4cd4 is described below
commit 0fa4cd48aed45b097aea3004b9bf00919b278778
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Apr 17 18:52:56 2019 +0200
BB to check old demo
---
buildbot/demo-checker-master.cfg | 178 +++++++++++++++++++++++++++++++++++++++
buildbot/demo-oldchecks.sh | 103 ++++++++++++++++++++++
buildbot/master.cfg | 1 +
3 files changed, 282 insertions(+)
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="address@hidden",
+sendToInterestedUsers=False,
+# notify from pass to fail, and viceversa.
+mode=("change"),
+builders=("demo-services-checker-builder"),
+ extraRecipients=["address@hidden"],
+ 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",
+}
diff --git a/buildbot/demo-oldchecks.sh b/buildbot/demo-oldchecks.sh
new file mode 100755
index 0000000..a3b9644
--- /dev/null
+++ b/buildbot/demo-oldchecks.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+error_fmt="%s (http status code: %s)/(curl exit code: %s - %s)\n"
+error_stringify ()
+{
+ case $1 in
+ 28) echo "connection timed out" ;;
+ 7) echo "failed to connect to host" ;;
+ 0) echo "not a error, curl went fine" ;;
+ *) echo "unknown, see curl man page" ;;
+ esac
+}
+
+DOMAIN="taler.net"
+DEPLOYMENT="demo"
+URL="https://exchange.${DEPLOYMENT}.${DOMAIN}/"
+http_status_code=$(curl \
+ -s "$URL" -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "'%s' failed\n" $URL
+ printf "$error_fmt" \
+ "Exchange (${URL}) down" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+
+URL="http://backend.${DEPLOYMENT}.${DOMAIN}/"
+http_status_code=$(curl \
+ -s $URL \
+ --header "Authorization: ApiKey sandbox" \
+ -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "'%s' failed\n" $URL
+ printf "$error_fmt" \
+ "Merchant ${URL} down" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+
+DF="address@hidden"
+URL="https://shop.${DEPLOYMENT}.${DOMAIN}/"
+http_status_code=$(curl \
+ -s $URL -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "%s failed" $URL
+ printf "$error_fmt" \
+ "Blog (${URL}) down" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+
+URL="https://survey.${DEPLOYMENT}.${DOMAIN}/"
+http_status_code=$(curl \
+ -s $URL -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "%s failed" $URL
+ printf "$error_fmt" \
+ "Survey (${URL}) is down" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+
+URL="https://donations.${DEPLOYMENT}.${DOMAIN}/"
+http_status_code=$(curl \
+ -s $URL -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "%s failed" $URL
+ printf "$error_fmt" \
+ "Donations (${URL}) is down" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+
+URL="https://bank.${DEPLOYMENT}.${DOMAIN}/"
+http_status_code=$(curl \
+ -s $URL -o /dev/null \
+ -w "%{http_code}")
+if ! test 302 = $http_status_code; then
+ printf "%s failed" $URL
+ printf "$error_fmt" \
+ "Bank (${URL}) is down" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+
+URL="https://${DEPLOYMENT}.${DOMAIN}/en/index.html"
+http_status_code=$(curl \
+ -s $URL -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "%s failed" $URL
+ printf "$error_fmt" \
+ "Landing (${URL}) is down." \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+
+printf "All services correctly restarted!\n"
diff --git a/buildbot/master.cfg b/buildbot/master.cfg
index 92827fa..719b58e 100644
--- a/buildbot/master.cfg
+++ b/buildbot/master.cfg
@@ -528,6 +528,7 @@ EMAIL = reporters.MailNotifier(
# notify from pass to fail, and viceversa.
mode=("change"),
builders=(
+ "lcov-builder",
"testswitcher-builder",
"doc-builder",
"wallet-builder",
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-deployment] branch master updated: BB to check old demo,
gnunet <=