mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 22:35:50 +00:00
Edit Jenkinsfile
This commit is contained in:
parent
bd2041a794
commit
bfb5d3b6f1
1 changed files with 5 additions and 2 deletions
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
|
@ -27,8 +27,11 @@ pipeline {
|
||||||
stage ('Creating Docker image') {
|
stage ('Creating Docker image') {
|
||||||
steps {
|
steps {
|
||||||
sh 'docker build -t vkarpenko02/mr:${GIT_COMMIT} .'
|
sh 'docker build -t vkarpenko02/mr:${GIT_COMMIT} .'
|
||||||
sh 'echo ${DOCKER_HUB_CREDS_PSW} | docker login -u ${DOCKER_HUB_CREDS_USR} --password-stdin'
|
withCredentials([usernamePassword(credentialsId: 'docker_key', usernameVariable: 'DOCKER_HUB_USER', passwordVariable: 'DOCKER_HUB_PASS')]) {
|
||||||
sh 'docker push vkarpenko02/mr:${GIT_COMMIT}'
|
sh """
|
||||||
|
echo ${DOCKER_HUB_PASS} | docker login -u ${DOCKER_HUB_USER} --password-stdin
|
||||||
|
docker push vkarpenko02/mr:${GIT_COMMIT}
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue