summaryrefslogtreecommitdiffstats
path: root/ci/launch_docker_container.sh
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-09-12 16:34:24 -0400
committermbeierl <mark.beierl@dell.com>2017-09-14 14:52:26 -0400
commitf92f97f53e3ee43c5d3b75673122ec9f94db196e (patch)
tree51e284845da8b9d9797d05210a58660061f9d1fa /ci/launch_docker_container.sh
parent9b2ba68b75ecd50600e6f375aeb4ea410cec0128 (diff)
Add Multi Arch to Docker
Adds multi arch support to the launching of the containers. Change-Id: Iee89cfad3dc455fe8fdd7861d73fadbe314c2c1e JIRA: STORPERF-220 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'ci/launch_docker_container.sh')
-rwxr-xr-xci/launch_docker_container.sh29
1 files changed, 11 insertions, 18 deletions
diff --git a/ci/launch_docker_container.sh b/ci/launch_docker_container.sh
index 2411ce0..ff28e05 100755
--- a/ci/launch_docker_container.sh
+++ b/ci/launch_docker_container.sh
@@ -8,32 +8,25 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-cd `dirname $0`
-ci=`pwd`
+cd "$(dirname "$0")" || exit 1
+ci=$(pwd)
-cd ${ci}/../docker-compose
+cd "${ci}/../docker-compose" || exit 1
-export ENV_FILE=${ci}/job/admin.rc
-export CARBON_DIR=${ci}/job/carbon/
+export ENV_FILE="${ci}/job/admin.rc"
+export CARBON_DIR="${ci}/job/carbon/"
-if [ ! -d ${ci}/job/carbon ]
+if [ ! -d "${ci}/job/carbon" ]
then
- mkdir ${ci}/job/carbon
-fi
-
-if [ -z ${ARCH} ]
-then
- ARCH=x86_64
+ mkdir -p "${ci}/job/carbon"
fi
+ARCH="${ARCH:-$(uname -m)}"
export ARCH
-if [ -z ${DOCKER_TAG} ]
-then
- DOCKER_TAG=latest
-fi
+DOCKER_TAG="${DOCKER_TAG:-latest}"
-export TAG=${DOCKER_TAG}
+export TAG="${ARCH}-${DOCKER_TAG}"
docker-compose pull
docker-compose up -d
@@ -42,7 +35,7 @@ echo "Waiting for StorPerf to become active"
ATTEMPTS=20
-while [ $(curl -s -o /dev/null -I -w "%{http_code}" -X GET http://127.0.0.1:5000/api/v1.0/configurations) != "200" ]
+while [ "$(curl -s -o /dev/null -I -w '%{http_code}' -X GET http://127.0.0.1:5000/api/v1.0/configurations)" != "200" ]
do
ATTEMPTS=$((ATTEMPTS - 1))
if [ ${ATTEMPTS} -le 1 ]