summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-09-20 11:01:27 +0300
committerYuli Shlosberg <ys9693@att.com>2017-09-20 11:37:26 +0300
commit14ee2878d35c650c0a13f928a526a8f45f144eca (patch)
tree991a72863555619d02f0227996eb2bd7e0a631fc /sdc-os-chef/scripts
parentaf6975568834f357478fb22de95f2f79f4a4c085 (diff)
Build sanity docker execute automation
Change-Id: I7d275c7ec744ec9790c1147c2c28e48b16d2d92c Issue-Id: SDC-315 Signed-off-by: Yuli Shlosberg <ys9693@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