3 # ============LICENSE_START=======================================================
5 # ================================================================================
6 # Copyright (C) 2017 AT&T Intellectual Property. All rights
8 # ================================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END============================================
21 # ===================================================================
22 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
29 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 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/sdc-sanity/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
31 #echo "please wait while Sanity Docker is starting..."
33 c=60 # seconds to wait
34 REWRITE="\e[45D\e[1A\e[K"
35 while [ $c -gt 0 ]; do
38 echo -e "${REWRITE}$c"
43 #monitor sanity process
48 while [ "$TIME" -lt "$TIME_OUT" ]; do
50 PID=`docker exec -i sdc-sanity ps -ef | grep java | awk '{print $2}'`
51 echo sanity PID is -- $PID
55 echo SDC sanity finished in $TIME seconds
59 echo Sleep: $INTERVAL seconds before testing if SDC sanity completed. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
61 TIME=$(($TIME+$INTERVAL))
64 if [ "$TIME" -ge "$TIME_OUT" ]
66 echo TIME OUT: Sany was NOT completed in $TIME_OUT seconds... Could cause problems for tests...
68 cp -rf ${WORKSPACE}/data/logs/sdc-sanity/ExtentReport/* ${WORKSPACE}/archives/
69 cp -rf ${WORKSPACE}/data/logs/ ${WORKSPACE}/archives/
70 cp -rf ${WORKSPACE}/data/logs/sdc-sanity/target/*.xml ${WORKSPACE}/archives/