Update Jenkinsfile

This commit is contained in:
Sanjeev435 2018-08-25 19:30:34 +05:30 committed by GitHub
parent b56d2be21d
commit 748476a81c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
Jenkinsfile vendored
View file

@ -16,7 +16,7 @@ pipeline {
stage('Docker Build') {
agent any
steps {
sh 'docker build -t mrcool435/spring-petclinic:latest .'
sh 'docker build -t spring-petclinic:latest .'
}
}
stage('Docker Push') {
@ -25,8 +25,8 @@ pipeline {
withCredentials([usernamePassword(credentialsId: 'DOCKER_HUB_GLOBAL', passwordVariable: 'dockerHubPassword',
usernameVariable: 'dockerHubUser')]) {
sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPassword}"
sh 'docker tag spring-petclinic1 mrcool435/mrcool435/spring-petclinic'
sh 'docker push mrcool435/spring-petclinic:latest'
sh 'docker tag spring-petclinic sanjeev435/spring-petclinic'
sh 'docker push sanjeev435/spring-petclinic'
}
}
}