mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
491977d251
commit
95d113f4b3
1 changed files with 20 additions and 1 deletions
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
|
@ -7,7 +7,26 @@ pipeline{
|
|||
sh './mvnw checkstyle:checkstyle'
|
||||
sh './mvnw verify'
|
||||
sh './mvnw clean package'
|
||||
sh 'docker build -t mr/spring-petclinic:${GIT_COMMIT:0:7} -f Dockerfile2 .'
|
||||
}
|
||||
}
|
||||
stage ("Build Docker Image") {
|
||||
steps {
|
||||
script{
|
||||
app = docker.build("surtexx/mr:${GIT_COMMIT}", "-f Dockerfile2 .")
|
||||
app.inside{
|
||||
sh 'echo $(curl localhostt:8080)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Push Docker Image") {
|
||||
steps {
|
||||
script{
|
||||
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') {
|
||||
app.push(${GIT_COMMIT})
|
||||
app.push("latest")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue