mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
ab91c3c4af
commit
7afaa3e07e
1 changed files with 7 additions and 5 deletions
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
|
@ -33,14 +33,16 @@ pipeline {
|
|||
}
|
||||
stage('Push artifact to docker registry') {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('', 'dockerhub_id') {
|
||||
dockerImage.push()
|
||||
dockerImage.push("latest")
|
||||
withRegistry(credentialsID: 'dockerhub_id') {
|
||||
sh """#!/bin/bash -xe
|
||||
|
||||
docker push()
|
||||
Image push("latest")
|
||||
}
|
||||
echo "Pushed Docker Image: ${env.IMAGE_NAME}"
|
||||
}
|
||||
sh "docker rmi ${env.IMAGE_NAME} ${env.IMAGE_NAME_LATEST}"
|
||||
docker rmi ${env.IMAGE_NAME} ${env.IMAGE_NAME_LATEST}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue