Trap ERR exit to help with CI logs 07/4607/1
authorTodd Malsbary <todd.malsbary@intel.com>
Thu, 6 Jan 2022 18:33:58 +0000 (10:33 -0800)
committerTodd Malsbary <todd.malsbary@intel.com>
Thu, 6 Jan 2022 18:39:59 +0000 (10:39 -0800)
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I6ab7ca12b8036c5a4832e46d651fe2c4f499a4ec

deploy/baremetal-operator/baremetal-operator.sh
deploy/cert-manager/cert-manager.sh
deploy/ironic/ironic.sh

index d912d97..35e79a1 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"
@@ -7,6 +7,11 @@ LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib"
 source $LIBDIR/logging.sh
 source $LIBDIR/common.sh
 
+trap err_exit ERR
+function err_exit {
+    kubectl get all -n baremetal-operator-system
+}
+
 # This may be used to update the in-place Bare Metal Operator YAML
 # files from the upstream project
 function build_source {
index ada4eb6..47afeb7 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"
@@ -10,6 +10,11 @@ source $LIBDIR/common.sh
 # Cert-Manager version to use
 CERT_MANAGER_VERSION="v1.5.3"
 
+trap err_exit ERR
+function err_exit {
+    kubectl get all -n cert-manager
+}
+
 # This may be used to update the in-place cert-manager YAML
 # files from the upstream project
 function build_source {
index 358dbb9..8f46c8c 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.