From 6cf1b861ede7ed6cf6a06f7f6c0783d0229d2e9b Mon Sep 17 00:00:00 2001 From: Joep van Delft Date: Wed, 28 Aug 2024 08:30:12 +0200 Subject: [PATCH] Delete from dev-preview mirror more precisly --- jobs/build/set_client_latest/S3-set-v4-client-latest.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jobs/build/set_client_latest/S3-set-v4-client-latest.sh b/jobs/build/set_client_latest/S3-set-v4-client-latest.sh index 937a4d401a..7febf4daae 100755 --- a/jobs/build/set_client_latest/S3-set-v4-client-latest.sh +++ b/jobs/build/set_client_latest/S3-set-v4-client-latest.sh @@ -133,8 +133,10 @@ for arch in ${ARCHES}; do # and readability. The check on MAJOR_MINOR is just a sanity check that it starts with a digit (e.g. "4.16") # so we are deleting only expected items. echo "Cleaning up old entries in ocp-dev-preview/" - aws s3 rm "s3://art-srv-enterprise/pub/openshift-v4/${arch}/clients/ocp-dev-preview/" --recursive --exclude "*" --include "${PREVIOUS_MAJOR_MINOR}.*" - aws s3 rm "s3://art-srv-enterprise/pub/openshift-v4/${arch}/clients/ocp-dev-preview/" --recursive --exclude "*" --include "${PREVIOUS_MAJOR_MINOR}.*" --profile cloudflare --endpoint-url ${CLOUDFLARE_ENDPOINT} + for kind in ec fc nightly; do + aws s3 rm "s3://art-srv-enterprise/pub/openshift-v4/${arch}/clients/ocp-dev-preview/" --recursive --exclude "*" --include "${PREVIOUS_MAJOR_MINOR}\.[0-9-]*${kind}\..*" + aws s3 rm "s3://art-srv-enterprise/pub/openshift-v4/${arch}/clients/ocp-dev-preview/" --recursive --exclude "*" --include "${PREVIOUS_MAJOR_MINOR}\.[0-9-]*${kind}\..*" --profile cloudflare --endpoint-url ${CLOUDFLARE_ENDPOINT} + done fi # List the all the other "latest-4.x" or "stable-4.x" directory names. s3 ls