From: Holger Levsen Date: Thu, 8 Nov 2012 12:10:02 +0000 (+0100) Subject: add checks if image exits X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=a128dc3647f95d8398bc4d5d0c7c2d3c721fc8be;p=profitbricks%2Fjenkins-build-scripts.git add checks if image exits --- diff --git a/liveboot_testdeploy.sh b/liveboot_testdeploy.sh index 1b4cdb0..ee7c282 100755 --- a/liveboot_testdeploy.sh +++ b/liveboot_testdeploy.sh @@ -8,22 +8,31 @@ set -x export if [ "$LIVEBOOT_ID" != "" ] ; then - echo "Ok." + echo "Ok, got LIVEBOOT_ID=$LIVEBOOT_ID" else - echo "Fail.a" + echo "Fail, no LIVEBOOT_ID set." exit 1 fi +if [ -d /srv/mirror/liveboot/liveboot-????????-${LIVEBOOT_ID}/ ] ; then + SOURCE_DIR=$(ls -d /srv/mirror/liveboot/liveboot-????????-${LIVEBOOT_ID}/) +else + echo "Fail, /srv/mirror/liveboot/liveboot-????????-${LIVEBOOT_ID}/ does not exist." + exit 1 +fi + +TESTSERVER=pserver2 + #ssh liveboot@riserver echo Ok -ping -c 1 pserver2 +ping -c 1 $TESTSERVER cat /etc/jenkins/pserver2.ipmi | ipmitool -H 192.168.178.49 -U ADMIN -a chassis power reset sleep 2 -ping -c 1 pserver2 || true +ping -c 1 $TESTSERVER || true sleep 60 -ping -c 1 pserver2 +ping -c 1 $TESTSERVER figlet "OK"