Skip to content

Commit 58f1360

Browse files
committed
Capture Deprovision logs
1 parent cb684b7 commit 58f1360

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

hack/e2e-common.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ function capture_manifests() {
344344
clusterdeployment \
345345
clusterimageset \
346346
clusterprovision \
347+
clusterdeprovision \
347348
clusterstate \
348349
dnszone \
349350
machinepool \
@@ -379,6 +380,16 @@ function capture_cluster_logs() {
379380
cat "${ARTIFACT_DIR}/hive_install_job.log"
380381
fi
381382

383+
# Capture deprovision logs
384+
if [[ -z "$(oc get cdr -n ${CLUSTER_NAMESPACE} -o jsonpath='{.status.completed}')" ]]
385+
then
386+
if UNINSTALL_JOB_NAME=$(oc get job -l "hive.openshift.io/cluster-deployment-name=${CLUSTER_NAME},hive.openshift.io/uninstall=true" -o name -n ${CLUSTER_NAMESPACE}) && [ "${UNINSTALL_JOB_NAME}" ]
387+
then
388+
oc logs -n ${CLUSTER_NAMESPACE} ${UNINSTALL_JOB_NAME} &> "${ARTIFACT_DIR}/hive_uninstall_job.log" || true
389+
oc get ${UNINSTALL_JOB_NAME} -n ${CLUSTER_NAMESPACE} -o yaml &> "${ARTIFACT_DIR}/hive_uninstall_job.yaml" || true
390+
fi
391+
fi
392+
382393
if [[ "${INSTALL_RESULT}" != "success" ]]
383394
then
384395
mkdir "${ARTIFACT_DIR}/hive"

0 commit comments

Comments
 (0)