From 494f18c451556927b279f2a4e35e18282941fa0e Mon Sep 17 00:00:00 2001 From: shindw Date: Wed, 4 Feb 2026 16:43:50 +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=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile.pjt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Jenkinsfile.pjt b/Jenkinsfile.pjt index bf0d869..3d7c29f 100644 --- a/Jenkinsfile.pjt +++ b/Jenkinsfile.pjt @@ -224,5 +224,27 @@ pipeline { } } + + stage('12) registry docker image cleanup') { + steps { + withCredentials([usernamePassword( + credentialsId: DOCKER_CRED, + usernameVariable: 'DOCKER_USER', + passwordVariable: 'DOCKER_PASS' + )]) { + sh ''' + set -e + + echo "[1/2] docker registry login" + echo "$DOCKER_PASS" | docker login ${REGISTRY_HOST} -u "$DOCKER_USER" --password-stdin + + curl -u $REG_USER:$REG_PASS https://${REGISTRY_HOST}/v2/${IMAGE_REPO}/tags/list + + docker logout ${REGISTRY_HOST} + ''' + } + } + } + } }