summaryrefslogtreecommitdiff
path: root/buildbot/switch.sh
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-02-13 19:13:53 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2019-02-13 19:13:53 +0100
commit27c277d752aac8ec5a7aacb308f061cb68361534 (patch)
tree5b7a83fe015324099432699c52bdfda0a7e72446 /buildbot/switch.sh
parentb8713c9c7b79ecd2af6d273fe182a8d0de798a6a (diff)
downloaddeployment-27c277d752aac8ec5a7aacb308f061cb68361534.tar.gz
deployment-27c277d752aac8ec5a7aacb308f061cb68361534.tar.bz2
deployment-27c277d752aac8ec5a7aacb308f061cb68361534.zip
Addressing #5424. Not tested (relatively depends on #5490).
Diffstat (limited to 'buildbot/switch.sh')
-rwxr-xr-xbuildbot/switch.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/buildbot/switch.sh b/buildbot/switch.sh
index 0489727..82c169d 100755
--- a/buildbot/switch.sh
+++ b/buildbot/switch.sh
@@ -1,11 +1,16 @@
#!/bin/bash
-active=$(sudo -u test cat /home/test/active)
-nonactive="test-blue"
+DEPLOYMENT="test"
+
+if test "stable" = ${BRANCH}; then
+ DEPLOYMENT="demo"
+
+active=$(sudo -u ${DEPLOYMENT} cat /home/${DEPLOYMENT}/active)
+nonactive="${DEPLOYMENT}-blue"
echo "Active party: ${active}"
-if test $active = "test-blue"; then
- nonactive="test-green"
+if test $active = "${DEPLOYMENT}-blue"; then
+ nonactive="${DEPLOYMENT}-green"
fi
cmd=$(printf "%s; %s" \