From 1915d9bbfff7d97eb1bfa25ec0da0d4fe8e600a5 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 4 Jun 2025 08:26:33 +0200 Subject: [PATCH] try git ref --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 11d7680..81ade99 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD' ).trim()}""" CONTAINER_REGISTRY = credentials('container_registry') - REPO_NAME = env.GIT_URL.replaceFirst(/^.*\/([^\/]+?).git$/, '$1') + REPO_NAME = env.GIT_URL.replaceFirst(/^.*\/([^\/]+)\/([^\/]+?)\.git$/, '$1/$2') } stages { stage('Build') { @@ -14,7 +14,7 @@ pipeline { steps { sh "printenv" sh "echo $REPO_NAME" - sh "podman build -t ${CONTAINER_REGISTRY}/${REPO_NAME}:${env.GIT_REF} ." + sh "podman build -t ${CONTAINER_REGISTRY}/${REPO_NAME}:${env.BRANCH_NAME} ." } } stage('Push') {