From 27c277d752aac8ec5a7aacb308f061cb68361534 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 13 Feb 2019 19:13:53 +0100 Subject: Addressing #5424. Not tested (relatively depends on #5490). --- buildbot/switch.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'buildbot/switch.sh') 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" \ -- cgit v1.2.3