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
40a4a597d4
commit
bd2041a794
1 changed files with 2 additions and 0 deletions
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
@ -3,6 +3,7 @@ pipeline {
|
|||
|
||||
environment {
|
||||
GIT_COMMIT = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
|
||||
DOCKER_CREDS = credentials('docker_key')
|
||||
}
|
||||
|
||||
stages {
|
||||
|
@ -26,6 +27,7 @@ pipeline {
|
|||
stage ('Creating Docker image') {
|
||||
steps {
|
||||
sh 'docker build -t vkarpenko02/mr:${GIT_COMMIT} .'
|
||||
sh 'echo ${DOCKER_HUB_CREDS_PSW} | docker login -u ${DOCKER_HUB_CREDS_USR} --password-stdin'
|
||||
sh 'docker push vkarpenko02/mr:${GIT_COMMIT}'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue