Update documentation for Cluster-API and Flux
[icn.git] / deploy / ironic / ironic.sh
index 358dbb9..f8bc2f8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-set -eux -o pipefail
+set -eEux -o pipefail
 
 SCRIPTDIR="$(readlink -f $(dirname ${BASH_SOURCE[0]}))"
 LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib"
@@ -9,6 +9,11 @@ source $LIBDIR/common.sh
 
 NAMEPREFIX="capm3"
 
+trap err_exit ERR
+function err_exit {
+    kubectl get all -n ${NAMEPREFIX}-system
+}
+
 # This may be used to update the in-place Ironic YAML files from the
 # upstream project.  We cannot use the upstream sources directly as
 # they require an envsubst step before kustomize build.
@@ -21,6 +26,7 @@ function build_source {
         mkdir -p $(dirname ${dst})
         envsubst <${src} >${dst}
     done
+    sed -i -e '/name: quay.io\/metal3-io\/ironic/{n;s/newTag:.*/newTag: '"${BMO_VERSION}"'/;}' ${SCRIPTDIR}/icn/kustomization.yaml
 }
 
 function deploy {