Fix quotes in shell script
Global variables defined in Jenkins need
double quotes to be translated properly in the case
section.
Change-Id: Ida76cd90314ef59f24013f7da80a2b5364fc9480
Issue-ID: CIMAN-132
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
diff --git a/shell/docker-build.sh b/shell/docker-build.sh
index c8dbd70..7990784 100644
--- a/shell/docker-build.sh
+++ b/shell/docker-build.sh
@@ -6,11 +6,11 @@
FULL_DATE=`date +'%Y%m%dT%H%M%S'`
IMAGE_VERSION=`xmlstarlet sel -N "x=http://maven.apache.org/POM/4.0.0" -t -v "/x:project/x:version" pom.xml | cut -c1-5`
-case $DOCKERREGISTRY in
- '$DOCKER_REGISTRY:10004') DOCKER_TAG="$IMAGE_VERSION"-STAGING-"$FULL_DATE"Z
+case "$DOCKERREGISTRY" in
+ "$DOCKER_REGISTRY:10004") DOCKER_TAG="$IMAGE_VERSION"-STAGING-"$FULL_DATE"Z
echo "Using tag $DOCKER_TAG"
;;
- '$DOCKER_REGISTRY:10003') DOCKER_TAG="$IMAGE_VERSION"-SNAPSHOT-"$FULL_DATE"Z
+ "$DOCKER_REGISTRY:10003") DOCKER_TAG="$IMAGE_VERSION"-SNAPSHOT-"$FULL_DATE"Z
echo "Using tag $DOCKER_TAG"
;;
esac