taler-deployment

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

commit 9a84b3583444a726d61115b7fb2806f73233238a
parent 943cadd51ad2c67d85f9aa70866c957f9e00102a
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Tue, 16 Apr 2019 12:40:34 +0200

sanity checks

Diffstat:
Mbuildbot/checks.sh | 26++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/buildbot/checks.sh b/buildbot/checks.sh @@ -1,14 +1,16 @@ #!/bin/bash -if test -z ${TALER_DEPLOYMENT}; then - echo "Please export env variable TALER_DEPLOYMENT=(test|demo) before running this script" - exit 1 +DEPLOYMENT="test" + +if test "stable" = ${BRANCH}; then + DEPLOYMENT="demo" fi + nonactive="dummy" -if test ${TALER_DEPLOYMENT} = "test"; then - active=$(sudo -u ${TALER_DEPLOYMENT} cat /home/${TALER_DEPLOYMENT}/active) +if test ${DEPLOYMENT} = "test"; then + active=$(sudo -u ${DEPLOYMENT} cat /home/${DEPLOYMENT}/active) nonactive="blue" echo "Active party: ${active}" @@ -30,7 +32,7 @@ error_stringify () error_fmt="%s (http status code: %s)/(curl exit code: %s - %s)\n" -URL="https://exchange.${TALER_DEPLOYMENT}.taler.net/" +URL="https://exchange.${DEPLOYMENT}.taler.net/" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ -s "$URL" -o /dev/null \ @@ -43,7 +45,7 @@ if ! test 200 = $http_status_code; then exit 1 fi -URL="http://backend.${TALER_DEPLOYMENT}.taler.net/" +URL="http://backend.${DEPLOYMENT}.taler.net/" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ -s $URL \ @@ -59,7 +61,7 @@ if ! test 200 = $http_status_code; then fi -URL="https://shop.${TALER_DEPLOYMENT}.taler.net/" +URL="https://shop.${DEPLOYMENT}.taler.net/" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ -s $URL -o /dev/null \ @@ -72,7 +74,7 @@ if ! test 200 = $http_status_code; then exit 1 fi -URL="https://survey.${TALER_DEPLOYMENT}.taler.net/" +URL="https://survey.${DEPLOYMENT}.taler.net/" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ -s $URL -o /dev/null \ @@ -85,7 +87,7 @@ if ! test 200 = $http_status_code; then exit 1 fi -URL="https://donations.${TALER_DEPLOYMENT}.taler.net/" +URL="https://donations.${DEPLOYMENT}.taler.net/" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ -s $URL -o /dev/null \ @@ -98,7 +100,7 @@ if ! test 200 = $http_status_code; then exit 1 fi -URL="https://bank.${TALER_DEPLOYMENT}.taler.net/" +URL="https://bank.${DEPLOYMENT}.taler.net/" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ -s $URL -o /dev/null \ @@ -111,7 +113,7 @@ if ! test 302 = $http_status_code; then exit 1 fi -URL="https://${TALER_DEPLOYMENT}.taler.net/en/index.html" +URL="https://${DEPLOYMENT}.taler.net/en/index.html" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ -s $URL -o /dev/null \