mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 06:45:49 +00:00
normal docker
normal docker
This commit is contained in:
parent
350e7e0bd8
commit
8cac70e919
1 changed files with 9 additions and 9 deletions
18
jenkinsfile
18
jenkinsfile
|
@ -41,18 +41,18 @@ node {
|
|||
}"""
|
||||
server.upload(uploadSpec)
|
||||
}
|
||||
stage('Petclinic Docker Image') {
|
||||
docker.withRegistry('https://registry-1.docker.io/v2/', 'dockerhub') {
|
||||
//stage('Petclinic Docker Image') {
|
||||
//docker.withRegistry('https://registry-1.docker.io/v2/', 'dockerhub') {
|
||||
|
||||
def customImage = docker.build("petclinic")
|
||||
// def customImage = docker.build("petclinic")
|
||||
|
||||
/* Push the container to the custom Registry */
|
||||
customImage.push()
|
||||
}
|
||||
//customImage.push()
|
||||
//}
|
||||
|
||||
//sh "sudo docker build --build-arg JAR_FILE_PATH=/var/lib/jenkins/workspace/sample/target/*.war -t sandeepds2002/petclinic ."
|
||||
//sh "sudo docker push sandeepds2002/petclinic"
|
||||
//sh "sudo rm -r /var/lib/jenkins/workspace/sample/target/spring-petclinic.jar"
|
||||
//sh "sudo docker rmi -f sandeepds2002/petclinic"
|
||||
sh "sudo docker build --build-arg JAR_FILE_PATH=/var/lib/jenkins/workspace/sample/target/*.war -t sandeepds2002/petclinic ."
|
||||
sh "sudo docker push sandeepds2002/petclinic"
|
||||
sh "sudo rm -r /var/lib/jenkins/workspace/sample/target/spring-petclinic.jar"
|
||||
sh "sudo docker rmi -f sandeepds2002/petclinic"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue