summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/merge.sh3
-rwxr-xr-xci/verify-build.sh80
2 files changed, 81 insertions, 2 deletions
diff --git a/ci/merge.sh b/ci/merge.sh
index 80ffdb6..333a05c 100755
--- a/ci/merge.sh
+++ b/ci/merge.sh
@@ -8,5 +8,4 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-# Just run the verify again for now
-`dirname $0`/verify.sh \ No newline at end of file
+exit 0
diff --git a/ci/verify-build.sh b/ci/verify-build.sh
new file mode 100755
index 0000000..dfa999c
--- /dev/null
+++ b/ci/verify-build.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2017 Dell EMC and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+cd `dirname $0`
+ci=`pwd`
+
+cd ${ci}/../docker
+
+export ENV_FILE=${ci}/job/admin.rc
+export CARBON_DIR=${ci}/job/carbon/
+
+touch ${ENV_FILE}
+mkdir -p ${CARBON_DIR}
+
+if [ -z $ARCH ]
+then
+ ARCH=x86_64
+fi
+
+export ARCH
+
+docker-compose -f local-docker-compose.yaml down
+docker-compose -f local-docker-compose.yaml build
+docker-compose -f local-docker-compose.yaml up -d
+
+function check_for_life() {
+ NAME=$1
+ URI=$2
+
+ echo "Waiting for ${NAME} to become active"
+ ATTEMPTS=10
+
+ while [ $(curl -s -o /dev/null -I -w "%{http_code}" -X GET http://127.0.0.1:5000${URI}) != "200" ]
+ do
+ ATTEMPTS=$((ATTEMPTS - 1))
+ if [ ${ATTEMPTS} -le 1 ]
+ then
+ echo "Failed to get a start up of ${NAME}"
+ return 1
+ fi
+ sleep 2
+ done
+}
+
+FAILURES=0
+
+check_for_life storperf-httpfrontend "/"
+FAILURES=$((FAILURES + $?))
+
+check_for_life storperf-master "/api/v1.0/configurations"
+FAILURES=$((FAILURES + $?))
+
+check_for_life storperf-reporting "/reporting/"
+FAILURES=$((FAILURES + $?))
+
+check_for_life storperf-swagger "/swagger/?url=http://127.0.0.1:5000/api/spec.json"
+FAILURES=$((FAILURES + $?))
+
+check_for_life storperf-graphite "/graphite/"
+FAILURES=$((FAILURES + $?))
+
+
+for container in master graphite httpfrontend swaggerui reporting
+do
+ echo "====================================="
+ echo "Log for storperf-${container}"
+ docker logs storperf-${container}
+done
+echo "====================================="
+
+docker-compose -f local-docker-compose.yaml down
+
+exit ${FAILURES}