taler-deployment

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

commit 3ae57f498c1fae474f38fd7dc722c1308454e443
parent 926b54290097d8607476ec73405519abebd5efea
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Fri, 28 Jun 2019 20:41:09 +0200

Conditionally check Twsiter services.

Diffstat:
Mbuildbot/checks.sh | 48++++++++++++++++++++++++++----------------------
Mbuildbot/master.cfg | 4++--
2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/buildbot/checks.sh b/buildbot/checks.sh @@ -108,29 +108,33 @@ if ! test 200 = $http_status_code; then fi -if test "test" = ${DEPLOYMENT}; then - URL="https://twister-backend.wild.gv.taler.net" - http_status_code=$(curl \ - -H "Authorization: ApiKey sandbox" \ - -s $URL -o /dev/null \ - -w "%{http_code}") - if ! test 200 = $http_status_code; then - - if test 503 = $http_status_code; then - printf "%s %s\n" \ - "Hit a '503 Service Unavailable' from Twister." \ - "Assuming all is correct." - exit 0 - fi - - # Real failure here. - printf "%s failed\n" $URL - printf "$error_fmt" \ - "Twister did not restart correctly" \ - $http_status_code $? "$(error_stringify $?)" - exit 1 - fi +if $(taler-config -s twister -o twister_deploy >& /dev/null); then + + for twister_url in "https://twister-backend.wild.gv.taler.net" \ + "https://twister-bank.wild.gv.taler.net" \ + "https://twister-exchange.wild.gv.taler.net"; do + http_status_code=$(curl \ + -H "Authorization: ApiKey sandbox" \ + -s $twister_url -o /dev/null \ + -w "%{http_code}") + if ! test 200 = $http_status_code; then + + if test 503 = $http_status_code; then + printf "%s %s\n" \ + "Hit a '503 Service Unavailable' from Twister." \ + "Assuming all is correct." + exit 0 + fi + + # Real failure here. + printf "%s failed\n" $twister_url + printf "$error_fmt" \ + "Twister did not restart correctly" \ + $http_status_code $? "$(error_stringify $?)" + exit 1 + fi + done fi diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -367,8 +367,8 @@ TIP_RESERVE_TOPPER_FACTORY.addStep(ShellCommand( BUILD_FACTORY = util.BuildFactory() BUILD_FACTORY.addStep(ShellCommand( name="build", - description="Building inactive blue-green party.", - descriptionDone="Inactive party got built.", + description="Building all Taler codebase.", + descriptionDone="Taler built.", command=["./build.sh"], workdir="../../deployment/buildbot", haltOnFailure=True))