From d623a145507f5c97f39765d63e697245909b3a7c Mon Sep 17 00:00:00 2001 From: Andrea Panattoni Date: Mon, 8 Jul 2024 14:42:08 +0200 Subject: [PATCH] DO NOT MERGE Signed-off-by: Andrea Panattoni --- hack/run-e2e-conformance-virtual-ocp.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hack/run-e2e-conformance-virtual-ocp.sh b/hack/run-e2e-conformance-virtual-ocp.sh index 6f5d7d72f..b24ae01f3 100755 --- a/hack/run-e2e-conformance-virtual-ocp.sh +++ b/hack/run-e2e-conformance-virtual-ocp.sh @@ -237,6 +237,23 @@ echo ${auth} > registry-login.conf internal_registry="image-registry.openshift-image-registry.svc:5000" pass=$( jq .\"image-registry.openshift-image-registry.svc:5000\".auth registry-login.conf ) pass=`echo ${pass:1:-1} | base64 -d` + + +function debug_DNM { + if [[ -v TEST_REPORT_PATH ]]; then + mkdir -p "${root}/${TEST_REPORT_PATH}" + oc -n ${NAMESPACE} get sa -o yaml > "${root}/${TEST_REPORT_PATH}/serviceaccounts.yaml" + oc -n ${NAMESPACE} get secret -o yaml > "${root}/${TEST_REPORT_PATH}/secrets.yaml" + + oc adm must-gather --dest-dir ./mg + tar czf "${root}/${TEST_REPORT_PATH}/must-gather.tar.gz" ./mg + + cp registry-login.conf "${root}/${TEST_REPORT_PATH}/registry-login.conf" + echo $pass > "${root}/${TEST_REPORT_PATH}/pass" + fi +} +trap debug_DNM ERR + podman login -u serviceaccount -p ${pass:15} $registry --tls-verify=false MAX_RETRIES=20