summaryrefslogtreecommitdiff
path: root/buildbot/config.sh
blob: dd224217e3a3efdfb28d736d91ddd8f5ba3e1277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

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 = "${DEPLOYMENT}-blue"; then
  nonactive="${DEPLOYMENT}-green"
fi

sudo -u $nonactive bash -c 'source $HOME/activate; taler-deployment-config-generate'