Fix image tagging

This commit is contained in:
myrmidex 2025-07-14 21:13:31 +02:00
parent cbd3b0fcb1
commit 0d4706105d

3
Jenkinsfile vendored
View file

@ -48,8 +48,10 @@ pipeline {
} }
} }
steps { steps {
script {
def tagName = env.ref?.replaceFirst(/^refs\/tags\//, '') def tagName = env.ref?.replaceFirst(/^refs\/tags\//, '')
sh "docker build -t $IMAGE_NAME:${tagName} -f docker/Dockerfile ." sh "docker build -t $IMAGE_NAME:${tagName} -f docker/Dockerfile ."
withCredentials([usernamePassword(credentialsId: "$DOCKER_CREDENTIALS_ID", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: "$DOCKER_CREDENTIALS_ID", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh """ sh """
echo "$PASSWORD" | docker login $REGISTRY -u "$USERNAME" --password-stdin echo "$PASSWORD" | docker login $REGISTRY -u "$USERNAME" --password-stdin
@ -59,4 +61,5 @@ pipeline {
} }
} }
} }
}
} }