Merge "Trap ERR exit to help with CI logs"
authorKuralamudhan Ramakrishnan <kuralamudhan.ramakrishnan@intel.com>
Fri, 7 Jan 2022 21:35:44 +0000 (21:35 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Fri, 7 Jan 2022 21:35:44 +0000 (21:35 +0000)
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.