From 718425df1f99dd7f93cb60bbe9eb01cab9e47f2a Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Thu, 6 Jan 2022 10:33:58 -0800 Subject: [PATCH] Trap ERR exit to help with CI logs Signed-off-by: Todd Malsbary Change-Id: I6ab7ca12b8036c5a4832e46d651fe2c4f499a4ec --- deploy/baremetal-operator/baremetal-operator.sh | 7 ++++++- deploy/cert-manager/cert-manager.sh | 7 ++++++- deploy/ironic/ironic.sh | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/deploy/baremetal-operator/baremetal-operator.sh b/deploy/baremetal-operator/baremetal-operator.sh index d912d97..35e79a1 100755 --- a/deploy/baremetal-operator/baremetal-operator.sh +++ b/deploy/baremetal-operator/baremetal-operator.sh @@ -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 { diff --git a/deploy/cert-manager/cert-manager.sh b/deploy/cert-manager/cert-manager.sh index ada4eb6..47afeb7 100755 --- a/deploy/cert-manager/cert-manager.sh +++ b/deploy/cert-manager/cert-manager.sh @@ -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 { diff --git a/deploy/ironic/ironic.sh b/deploy/ironic/ironic.sh index 358dbb9..8f46c8c 100755 --- a/deploy/ironic/ironic.sh +++ b/deploy/ironic/ironic.sh @@ -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. -- 2.16.6