From 963054ed580824e0f3901e3a53f7994349434d13 Mon Sep 17 00:00:00 2001 From: "Kevin H. Luu" Date: Wed, 2 Sep 2026 15:09:18 -0700 Subject: [PATCH] [CI] Exclude nightly-dev tags from nightly DockerHub cleanup (#55023) Signed-off-by: khluu --- .buildkite/scripts/cleanup-nightly-builds.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.buildkite/scripts/cleanup-nightly-builds.sh b/.buildkite/scripts/cleanup-nightly-builds.sh index 85bd573a53..b324778b1f 100755 --- a/.buildkite/scripts/cleanup-nightly-builds.sh +++ b/.buildkite/scripts/cleanup-nightly-builds.sh @@ -4,6 +4,7 @@ set -ex # Clean up old nightly builds from DockerHub, keeping only the last 14 builds # This script uses DockerHub API to list and delete old tags with specified prefix +# Tags starting with "nightly-dev" are always excluded from deletion # Usage: cleanup-nightly-builds.sh [TAG_PREFIX] [REPO] # Example: cleanup-nightly-builds.sh "nightly-" # Example: cleanup-nightly-builds.sh "cu130-nightly-" @@ -55,7 +56,8 @@ get_all_tags() { set -x # Get both last_updated timestamp and tag name, separated by | - local tags=$(echo "$response" | jq -r --arg prefix "$TAG_PREFIX" '.results[] | select(.name | startswith($prefix)) | "\(.last_updated)|\(.name)"') + # Exclude nightly-dev tags from cleanup + local tags=$(echo "$response" | jq -r --arg prefix "$TAG_PREFIX" '.results[] | select(.name | startswith($prefix)) | select(.name | startswith("nightly-dev") | not) | "\(.last_updated)|\(.name)"') if [ -z "$tags" ]; then break