Fixup Daily 19/40419/2
authormbeierl <mark.beierl@dell.com>
Mon, 28 Aug 2017 14:09:57 +0000 (10:09 -0400)
committermbeierl <mark.beierl@dell.com>
Mon, 28 Aug 2017 14:10:55 +0000 (10:10 -0400)
Allows daily to terminate on error

Change-Id: I31efdf3adcf6f2c09e02c21c4d10a5894d0ad6b7
Signed-off-by: mbeierl <mark.beierl@dell.com>
ci/daily.sh
ci/launch_docker_container.sh

index b984824..8af8562 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash -xe
 ##############################################################################
 # Copyright (c) 2015 EMC and others.
 #
@@ -14,6 +14,12 @@ then
     WORKSPACE=`pwd`
 fi
 
+docker-compose --version
+if [ $? -ne 0 ]
+then
+    echo "Docker compose is missing"
+    exit 1
+fi
 
 git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/ci/job/releng
 
index 47a1f17..949bf9d 100755 (executable)
@@ -34,7 +34,15 @@ docker-compose -f local-docker-compose.yaml up -d
 
 echo "Waiting for StorPerf to become active"
 
+ATTEMPTS=20
+
 while [ $(curl -s -o /dev/null -I -w "%{http_code}" -X GET http://127.0.0.1:5000/api/v1.0/configurations) != "200" ]
 do
+    ATTEMPTS=$((ATTEMPTS - 1))
+    if [ ${ATTEMPTS} -le 1 ]
+    then
+        echo "Failed to get a start up of StorPerf Master"
+        exit 1
+    fi
     sleep 1
 done