From b196a7bc851348615ca78e649dee7a25cba99e29 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sun, 17 Nov 2024 19:47:18 +0100 Subject: [PATCH] including branch name in latest tag --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3042a05..ca7f5b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,7 +46,7 @@ pipeline { --context=dir://. \ --dockerfile=Dockerfile.prod \ --destination=${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \ - --destination=${REGISTRY}/${IMAGE_NAME}:latest + --destination=${REGISTRY}/${IMAGE_NAME}:${BRANCH_NAME}-latest rm -rf /kaniko/*[0-9]* && rm -rf /kaniko/Dockerfile && mkdir -p /workspace ''' sh ''' @@ -57,7 +57,7 @@ pipeline { --context=dir://. \ --dockerfile=Dockerfile.test \ --destination=${REGISTRY}/${IMAGE_NAME}-test:${IMAGE_TAG} \ - --destination=${REGISTRY}/${IMAGE_NAME}-test:latest + --destination=${REGISTRY}/${IMAGE_NAME}-test:${BRANCH_NAME}-latest ''' } }