mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 07:45:49 +00:00
Edit Jenkinsfile
This commit is contained in:
parent
1f598ff6b2
commit
5da907f8b3
1 changed files with 7 additions and 3 deletions
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
|
@ -1,5 +1,9 @@
|
|||
pipeline {
|
||||
agent any
|
||||
agent {
|
||||
docker {
|
||||
image 'docker:latest'
|
||||
}
|
||||
}
|
||||
|
||||
environment {
|
||||
GIT_COMMIT = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
|
||||
|
@ -25,8 +29,8 @@ pipeline {
|
|||
}
|
||||
stage ('Creating Docker image') {
|
||||
steps {
|
||||
sh 'docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/workspace -w /workspace docker:20.10 build -t vkarpenko02/spring-petclinic:${GIT_COMMIT} .'
|
||||
sh 'docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker:20.10 push vkarpenko02/spring-petclinic:${GIT_COMMIT}'
|
||||
sh 'docker build -t vkarpenko02/spring-petclinic:${GIT_COMMIT} .'
|
||||
sh 'docker push vkarpenko02/mr'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue