From cfd6ec852c7e044374806460335f55d9d3e041d2 Mon Sep 17 00:00:00 2001 From: shindw Date: Thu, 5 Feb 2026 11:15:33 +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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile.pjt b/Jenkinsfile.pjt index d093e1f..f3dd9cc 100644 --- a/Jenkinsfile.pjt +++ b/Jenkinsfile.pjt @@ -234,9 +234,10 @@ pipeline { sh ''' set -e - + echo "[1/2] Remove registry old image tag list" TAGS_TO_DELETE=$(curl -s -u "$DOCKER_USER:$DOCKER_PASS" https://${REGISTRY_HOST}/v2/${IMAGE_REPO}/tags/list | jq -r '.tags[]' | grep -E '^[0-9]+' | sort -t- -k1,1n | head -n -5) + echo "[2/2] Remove registry old image sha list and delete registry" 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')