aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-11-08 15:31:27 +0200
committerYuli Shlosberg <ys9693@att.com>2017-11-08 15:31:59 +0200
commitf87df4c05972364d4ed4c84ce65a204689ce224b (patch)
tree7d217759e85208ad4b1dc64f132107bec5d23b83
parent31509f91af5a213776b0fec04fe78164d74b8cbe (diff)
fix docker_run script
Change-Id: I3c87db4bd9c3ff9524a3d01de3eb947071f9484d Issue-Id: SDC-608 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
-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