summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-11-08 15:31:27 +0200
committerYuli Shlosberg <ys9693@att.com>2017-11-13 12:55:45 +0000
commit3301becbe0db1b22b112addb02afcb882aa602f1 (patch)
treef566d7c5cb7a848249e51ede1bb56953d3fd6129 /sdc-os-chef/scripts
parentce113865c2fafa11ef20f56201e2004013bc1169 (diff)
fix docker_run script
Change-Id: I3c87db4bd9c3ff9524a3d01de3eb947071f9484d Issue-Id: SDC-608 Signed-off-by: Yuli Shlosberg <ys9693@att.com> (cherry picked from commit f87df4c05972364d4ed4c84ce65a204689ce224b)
Diffstat (limited to 'sdc-os-chef/scripts')
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index 08be852676..b147c812aa 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -64,27 +64,27 @@ DEBUG_PORT="--publish 4000:4000"
[ -f /opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
[ -f /opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) || NEXUS_DOCKER_REPO=ecomp-nexus:${PORT}
-while [ "$1" != "" ]; do
+while test $# -gt 0; do
case $1 in
-r | --release )
shift
- RELEASE=${1}
+ RELEASE=$1
;;
-e | --environment )
shift
- DEP_ENV=${1}
+ DEP_ENV=$1
;;
-p | --port )
shift
- PORT=${1}
+ PORT=$1
;;
- -l | --local )
- shift
- LOCAL=true
- ;;
- -s | --skipTests )
- shift
- SKIPTESTS=true
+ -l | --local )
+ shift
+ LOCAL=true
+ ;;
+ -s | --skipTests )
+ shift
+ SKIPTESTS=true
;;
-h | --help )
usage
@@ -94,9 +94,9 @@ while [ "$1" != "" ]; do
usage
exit 1
esac
- shift
done
+
[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO