Adds Utility functions and failure logging
[apex.git] / ci / deploy.sh
index 13f9382..731cd44 100755 (executable)
@@ -926,8 +926,12 @@ EOI
 
   ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
 source stackrc
-set -o errexit
 openstack overcloud deploy --templates $DEPLOY_OPTIONS --timeout 90
+if ! heat stack-list | grep CREATE_COMPLETE 1>/dev/null; then
+  $(typeset -f debug_stack)
+  debug_stack
+  exit 1
+fi
 EOI
 
   if [ "$debug" == 'TRUE' ]; then
@@ -1178,6 +1182,7 @@ parse_cmdline() {
   ##LIBRARIES
   # Do this after cli parse so that $CONFIG is set properly
   source $CONFIG/lib/common-functions.sh
+  source $CONFIG/lib/utility-functions.sh
   source $CONFIG/lib/installer/onos/onos_gw_mac_update.sh
 
 }