@@ -61,6 +61,13 @@ on_exit() {
6161
6262 # Cleanup VSPHERE_PASSWORD from temporary artifacts directory.
6363 if [[ " ${ORIGINAL_ARTIFACTS} " != " " ]]; then
64+ # unpack pod-logs.tar.gz files to replace secrets in them
65+ find " ${ARTIFACTS} " -type f -name pod-logs.tar.gz | while IFS= read -r tarball; do
66+ echo " Unpacking ${tarball} for secrets replacement"
67+ mkdir -p " ${tarball} -unpacked"
68+ tar -xzf " ${tarball} " -C " ${tarball} -unpacked"
69+ rm " ${tarball} "
70+ done
6471 # Delete non-text files from artifacts directory to not leak files accidentially
6572 find " ${ARTIFACTS} " -type f -exec file --mime-type {} \; | grep -v -E -e " text/plain|text/xml|application/json|inode/x-empty" | while IFS= read -r line
6673 do
@@ -83,6 +90,13 @@ on_exit() {
8390 sed -i " s/${VSPHERE_PASSWORD_B64} /REDACTED/g" " ${file} "
8491 done || true
8592 fi
93+ # re-packing pod-logs.tar.gz-unpacked
94+ find " ${ARTIFACTS} " -type d -name pod-logs.tar.gz-unpacked | while IFS= read -r tarballDirectory; do
95+ tarball=" ${tarballDirectory% -unpacked} "
96+ echo " Packing ${tarballDirectory} to ${tarball} after secrets replacement"
97+ tar -czf " ${tarball} " -C . " ${tarballDirectory} "
98+ rm -r " ${tarballDirectory} "
99+ done
86100 # Move all artifacts to the original artifacts location.
87101 mv " ${ARTIFACTS} " /* " ${ORIGINAL_ARTIFACTS} /"
88102 fi
@@ -104,7 +118,7 @@ export VSPHERE_USERNAME="${GOVC_USERNAME:-}"
104118export VSPHERE_PASSWORD=" ${GOVC_PASSWORD:- } "
105119export E2E_CONF_FILE=" ${REPO_ROOT} /test/e2e/config/vsphere.yaml"
106120export E2E_CONF_OVERRIDE_FILE=" "
107- export E2E_VM_OPERATOR_VERSION=" ${VM_OPERATOR_VERSION:- v1.8.6-0-gde75746a} "
121+ export E2E_VM_OPERATOR_VERSION=" ${VM_OPERATOR_VERSION:- v1.8.6-0-gde75746a-65e87004 } "
108122export DOCKER_IMAGE_TAR=" /tmp/images/image.tar"
109123export GC_KIND=" false"
110124
0 commit comments