From 0e8af078e54bb1fc7766033e6d6f8e51f144446d Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Sun, 26 Mar 2017 15:50:01 +0200 Subject: calling new sanity checks --- buildbot/checks.sh | 20 ++++++++++++++------ buildbot/master.cfg | 21 ++++++++------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/buildbot/checks.sh b/buildbot/checks.sh index fd3afe8..8b94c6c 100755 --- a/buildbot/checks.sh +++ b/buildbot/checks.sh @@ -1,31 +1,39 @@ #!/bin/bash -if ! curl -s https://exchange.test.taler.net/ &> /dev/null; then +active=$(sudo -u test cat /home/test/active) +nonactive="blue" +echo "Active party: ${active}" + +if test $active = "test-blue"; then + nonactive="green" +fi + +if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://exchange.test.taler.net/ &> /dev/null; then echo Exchange did not restart correctly exit 1 fi -if ! curl -s http://backend.test.taler.net/ &> /dev/null; then +if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s http://backend.test.taler.net/ &> /dev/null; then echo Merchant backend did not restart correctly exit 1 fi -if ! curl -s https://shop.test.taler.net/ &> /dev/null; then +if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://shop.test.taler.net/ &> /dev/null; then echo Blog did not restart correctly exit 1 fi -if ! curl -s https://donations.test.taler.net/ &> /dev/null; then +if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://donations.test.taler.net/ &> /dev/null; then echo Donations shop did not restart correctly exit 1 fi -if ! curl -s https://bank.test.taler.net/ &> /dev/null; then +if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://bank.test.taler.net/ &> /dev/null; then echo Bank did not restart correctly exit 1 fi -if ! curl -s https://test.taler.net/ &> /dev/null; then +if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://test.taler.net/ &> /dev/null; then echo Landing page did not restart correctly exit 1 fi diff --git a/buildbot/master.cfg b/buildbot/master.cfg index 00a8fda..68654b8 100644 --- a/buildbot/master.cfg +++ b/buildbot/master.cfg @@ -103,28 +103,23 @@ switcher_factory.addStep(Git(repourl='git://git.taler.net/deployment.git', switcher_factory.addStep(ShellCommand(name="build", description="Building inactive blue-green party.", descriptionDone="Compile.", - command=["./switch_build.sh"], - workdir="build/taler-build")) + command=["./build.sh"], + workdir="build/buildbot")) switcher_factory.addStep(ShellCommand(name="build", description="Starting inactive blue-green party.", descriptionDone="Restarting Taler.", - command=["./switch_restart.sh"], - workdir="build/taler-build")) + command=["./restart.sh"], + workdir="build/buildbot")) switcher_factory.addStep(ShellCommand(name="build", description="Checking Exchange.", descriptionDone="Exchange checked.", - command=["./switch_check_exchange.sh"], - workdir="build/taler-build")) -switcher_factory.addStep(ShellCommand(name="build", - description="Checking Merchants Backends.", - descriptionDone="Both backends checked.", - command=["./switch_check_merchant.sh"], - workdir="build/taler-build")) + command=["./checks.sh"], + workdir="build/buildbot")) switcher_factory.addStep(ShellCommand(name="build", description="Switching active party.", descriptionDone="Active party has been switched.", - command=["./switch_switch.sh"], - workdir="build/taler-build")) + command=["./switch.sh"], + workdir="build/buildbot")) selenium_factory = util.BuildFactory() selenium_factory.addStep(ShellCommand(name="selenium", description="Headless browser test", -- cgit v1.2.3