try git ref
Some checks are pending
Build Multiarch Container Image / call-reusable-workflow (push) Waiting to run

This commit is contained in:
Sebastian Hugentobler 2025-06-04 08:26:33 +02:00
parent 9322fb6bcd
commit 1915d9bbff
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M

4
Jenkinsfile vendored
View file

@ -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' script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD'
).trim()}""" ).trim()}"""
CONTAINER_REGISTRY = credentials('container_registry') CONTAINER_REGISTRY = credentials('container_registry')
REPO_NAME = env.GIT_URL.replaceFirst(/^.*\/([^\/]+?).git$/, '$1') REPO_NAME = env.GIT_URL.replaceFirst(/^.*\/([^\/]+)\/([^\/]+?)\.git$/, '$1/$2')
} }
stages { stages {
stage('Build') { stage('Build') {
@ -14,7 +14,7 @@ pipeline {
steps { steps {
sh "printenv" sh "printenv"
sh "echo $REPO_NAME" 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') { stage('Push') {