From e0f731718e95d311d7297cca01d33bfd4e075774 Mon Sep 17 00:00:00 2001 From: shindw Date: Tue, 3 Feb 2026 10:26:15 +0900 Subject: [PATCH] =?UTF-8?q?[api]=20Jenkinsfile.pjt=20=EC=9E=91=EC=97=85?= =?UTF-8?q?=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile.pjt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile.pjt b/Jenkinsfile.pjt index afa9862..6c4e7b2 100644 --- a/Jenkinsfile.pjt +++ b/Jenkinsfile.pjt @@ -10,7 +10,6 @@ pipeline { // ===== Registry ===== REGISTRY_HOST = "registry.pjt.kr" IMAGE_REPO = "alist/api" - IMAGE_TAG = "" DOCKER_CRED = "docker-registry-cred" // ← Jenkins Credentials ID } @@ -31,14 +30,12 @@ pipeline { } } - stage('3) image tag create') { + stage('3) image tab create') { steps { script { - env.IMAGE_TAG = sh( - script: 'echo "${BUILD_NUMBER}-$(git rev-parse --short HEAD)"', - returnStdout: true - ).trim() - + env.SHORT_SHA = sh(script: "git rev-parse --short HEAD", returnStdout: true).trim() + echo "SHORT_SHA = ${env.SHORT_SHA}" + env.IMAGE_TAG = "${env.BUILD_NUMBER}-${env.SHORT_SHA}" echo "IMAGE_TAG = ${env.IMAGE_TAG}" } }