From 175e0d22546cbda5dd385119f67abefde42fe041 Mon Sep 17 00:00:00 2001 From: Mark Hamzy Date: Fri, 19 Jun 2020 11:05:37 -0500 Subject: [PATCH] The wait command can return an error code causing the pipeline failure to exit the shell --- .../cluster-launch-installer-openstack-e2e-ppc64le.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e-ppc64le.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e-ppc64le.yaml index b8dcd7d66aaaf..c75ffa4307f33 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e-ppc64le.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e-ppc64le.yaml @@ -471,7 +471,6 @@ objects: OS_DEBUG=1 TF_LOG=trace openshift-install --dir=/tmp/artifacts/installer create cluster --log-level=debug & PID_OPENSHIFT_INSTALL=$! - echo "PID_OPENSHIFT_INSTALL=${PID_OPENSHIFT_INSTALL}" # Copy the ephemeral installer files in case there is a problem with them mkdir /tmp/artifacts/openshift-installer-files @@ -489,9 +488,13 @@ objects: done # wait for installer create cluster and return its status + # disable errexit on pipeline failures for the wait command + set +e + echo "wait for installer PID ${PID_OPENSHIFT_INSTALL}" wait "${PID_OPENSHIFT_INSTALL}" RC=$? - echo "RC=${RC}" + echo "wait for installer PID ${PID_OPENSHIFT_INSTALL} RC=${RC}" + set -e if [ ${RC} -gt 0 ] then OS_DEBUG=1 TF_LOG=trace openshift-install --dir=/tmp/artifacts/installer wait-for install-complete --log-level=debug