mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
Edit Jenkinsfile
This commit is contained in:
parent
b63e92337f
commit
f7802e82c0
1 changed files with 11 additions and 11 deletions
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
|
@ -24,16 +24,16 @@ pipeline {
|
|||
archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: false
|
||||
}
|
||||
}
|
||||
stage ('Creating Docker image') {
|
||||
steps {
|
||||
sh 'docker build -t vkarpenko02/mr:${GIT_COMMIT} .'
|
||||
withCredentials([usernamePassword(credentialsId: 'docker_key', usernameVariable: 'DOCKER_HUB_USER', passwordVariable: 'DOCKER_HUB_PASS')]) {
|
||||
sh """
|
||||
echo ${DOCKER_HUB_PASS} | docker login -u ${DOCKER_HUB_USER} --password-stdin
|
||||
docker push vkarpenko02/mr:${GIT_COMMIT}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
// stage ('Creating Docker image') {
|
||||
// steps {
|
||||
// sh 'docker build -t vkarpenko02/mr:${GIT_COMMIT} .'
|
||||
// withCredentials([usernamePassword(credentialsId: 'docker_key', usernameVariable: 'DOCKER_HUB_USER', passwordVariable: 'DOCKER_HUB_PASS')]) {
|
||||
// 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