Fix image tagging
This commit is contained in:
parent
cbd3b0fcb1
commit
0d4706105d
1 changed files with 10 additions and 7 deletions
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
|
|
@ -48,8 +48,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def tagName = env.ref?.replaceFirst(/^refs\/tags\//, '')
|
||||
sh "docker build -t $IMAGE_NAME:${tagName} -f docker/Dockerfile ."
|
||||
|
||||
withCredentials([usernamePassword(credentialsId: "$DOCKER_CREDENTIALS_ID", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
|
||||
sh """
|
||||
echo "$PASSWORD" | docker login $REGISTRY -u "$USERNAME" --password-stdin
|
||||
|
|
@ -59,4 +61,5 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue