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