Update Jenkinsfile

This commit is contained in:
Sanjeev435 2018-08-25 05:33:57 +05:30 committed by GitHub
parent fa4c21b4f9
commit 3064d719ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

10
Jenkinsfile vendored
View file

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