aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-09-12 14:11:48 +0300
committerMichael Lando <ml636r@att.com>2017-09-20 13:22:07 +0300
commit9dde926417f80d93f4159be8164ed5b3d8790a75 (patch)
tree0df8a81a29b85c66c1e18dbedf8bf5b66526bf8c /sdc-os-chef/scripts
parent0ad3c80822671529393e551bbb7b4a69dbd8550e (diff)
Build sanity docker execute automation
Change-Id: Iab282ea167d12fba4a3f425a5d300397ab435b44 Issue-Id: SDC-315 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'sdc-os-chef/scripts')
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index c79dad2d56..d645f94b93 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -2,7 +2,7 @@
function usage {
- echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -h|--help ]"
+ echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -s|--skipTests <Run-without-sanityDocker>] [ -h|--help ]"
}
@@ -25,6 +25,7 @@ function dir_perms {
RELEASE=latest
LOCAL=false
+SKIPTESTS=false
[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__
[ -f /opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) || NEXUS_USERNAME=release
[ -f /opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
@@ -48,6 +49,10 @@ while [ "$1" != "" ]; do
shift
LOCAL=true
;;
+ -s | --skipTests )
+ shift
+ SKIPTESTS=true
+ ;;
-h | --help )
usage
exit
@@ -157,3 +162,12 @@ if [ $? -ne 0 ]; then
exit 1
fi
+# sanityDocker
+echo "docker run sdc-frontend..."
+if [ ${SKIPTESTS} = false ]; then
+echo "Triger sanity docker, please wait..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-sanity:${RELEASE}
+ fi
+ docker run --detach --name sdc-sanity --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 512m --memory-swap=512m --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/logs/sdc-sanity/target:/var/lib/tests/target --volume /data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume /data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
+fi