From c3d65c8874ec99247c86d5894bb41d5ab716ff06 Mon Sep 17 00:00:00 2001 From: shindw Date: Thu, 5 Feb 2026 09:57:38 +0900 Subject: [PATCH] =?UTF-8?q?[api]=20Jenkinsfile.pjt=20-=20=EB=A0=88?= =?UTF-8?q?=ED=8C=8C=EC=A7=80=ED=86=A0=EB=A6=AC=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile.pjt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile.pjt b/Jenkinsfile.pjt index fe8134c..d093e1f 100644 --- a/Jenkinsfile.pjt +++ b/Jenkinsfile.pjt @@ -240,7 +240,14 @@ pipeline { for TAG in $TAGS_TO_DELETE; do DIGEST=$(curl -s -u "$DOCKER_USER:$DOCKER_PASS" -H "Accept: application/vnd.oci.image.index.v1+json, application/vnd.oci.image.manifest.v1+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.docker.distribution.manifest.v2+json" -D - https://${REGISTRY_HOST}/v2/${IMAGE_REPO}/manifests/$TAG -o /dev/null | grep -i Docker-Content-Digest | awk '{print $2}' | tr -d $'\r') + if [ -z "$DIGEST" ]; then + echo "[SKIP] $TAG digest not found" + continue + fi + echo "[DRY] $TAG -> $DIGEST" + + curl -s -u "$DOCKER_USER:$DOCKER_PASS" -X DELETE "https://${REGISTRY_HOST}/v2/${IMAGE_REPO}/manifests/${DIGEST}" -o /dev/null -w "HTTP %{http_code}\n" done '''