summaryrefslogtreecommitdiff
path: root/buildbot/checks.sh
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-11-28 11:25:40 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-11-28 11:25:40 +0100
commit6ad237699ad68239875c6bf487f9b33241542986 (patch)
tree6e175c3ce90a94643ccd82acb03bc1e2a815adf6 /buildbot/checks.sh
parent11f1874a227ca99e0c26fbdd1f854b4701e722f0 (diff)
downloaddeployment-6ad237699ad68239875c6bf487f9b33241542986.tar.gz
deployment-6ad237699ad68239875c6bf487f9b33241542986.tar.bz2
deployment-6ad237699ad68239875c6bf487f9b33241542986.zip
Adapt "services checker" script to "demo" deployment.
Diffstat (limited to 'buildbot/checks.sh')
-rwxr-xr-xbuildbot/checks.sh34
1 files changed, 22 insertions, 12 deletions
diff --git a/buildbot/checks.sh b/buildbot/checks.sh
index 85d031f..aba64be 100755
--- a/buildbot/checks.sh
+++ b/buildbot/checks.sh
@@ -1,14 +1,14 @@
#!/bin/bash
-if test -z ${DEPLOYMENT}; then
- echo "Please export env variable DEPLOYMENT=(test|demo) before running this script"
+if test -z ${TALER_DEPLOYMENT}; then
+ echo "Please export env variable TALER_DEPLOYMENT=(test|demo) before running this script"
exit 1
fi
nonactive="dummy"
-if test $DEPLOYMENT = "test"; then
- active=$(sudo -u $DEPLOYMENT cat /home/$DEPLOYMENT/active)
+if test ${TALER_DEPLOYMENT} = "test"; then
+ active=$(sudo -u ${TALER_DEPLOYMENT} cat /home/${TALER_DEPLOYMENT}/active)
nonactive="blue"
echo "Active party: ${active}"
@@ -30,7 +30,7 @@ error_stringify ()
error_fmt="%s (http status code: %s)/(curl exit code: %s - %s)\n"
-URL="https://exchange.${DEPLOYMENT}.taler.net/"
+URL="https://exchange.${TALER_DEPLOYMENT}.taler.net/"
http_status_code=$(curl \
-H "X-Taler-Deployment-Color: $nonactive" \
-s "$URL" -o /dev/null \
@@ -43,7 +43,7 @@ if ! test 200 = $http_status_code; then
exit 1
fi
-URL="http://backend.${DEPLOYMENT}.taler.net/"
+URL="http://backend.${TALER_DEPLOYMENT}.taler.net/"
http_status_code=$(curl \
-H "X-Taler-Deployment-Color: $nonactive" \
-s $URL \
@@ -59,7 +59,7 @@ if ! test 200 = $http_status_code; then
fi
-URL="https://shop.${DEPLOYMENT}.taler.net/"
+URL="https://shop.${TALER_DEPLOYMENT}.taler.net/"
http_status_code=$(curl \
-H "X-Taler-Deployment-Color: $nonactive" \
-s $URL -o /dev/null \
@@ -72,8 +72,20 @@ if ! test 200 = $http_status_code; then
exit 1
fi
+URL="https://survey.${TALER_DEPLOYMENT}.taler.net/"
+http_status_code=$(curl \
+ -H "X-Taler-Deployment-Color: $nonactive" \
+ -s $URL -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "%s failed" $URL
+ printf "$error_fmt" \
+ "Survey site did not restart correctly" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
-URL="https://donations.${DEPLOYMENT}.taler.net/"
+URL="https://donations.${TALER_DEPLOYMENT}.taler.net/"
http_status_code=$(curl \
-H "X-Taler-Deployment-Color: $nonactive" \
-s $URL -o /dev/null \
@@ -86,9 +98,7 @@ if ! test 200 = $http_status_code; then
exit 1
fi
-
-
-URL="https://bank.${DEPLOYMENT}.taler.net/"
+URL="https://bank.${TALER_DEPLOYMENT}.taler.net/"
http_status_code=$(curl \
-H "X-Taler-Deployment-Color: $nonactive" \
-s $URL -o /dev/null \
@@ -101,7 +111,7 @@ if ! test 302 = $http_status_code; then
exit 1
fi
-URL="https://${DEPLOYMENT}.taler.net/en/index.html"
+URL="https://${TALER_DEPLOYMENT}.taler.net/en/index.html"
http_status_code=$(curl \
-H "X-Taler-Deployment-Color: $nonactive" \
-s $URL -o /dev/null \