mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 09:25:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
b01467cb77
commit
1e7b5c7810
1 changed files with 25 additions and 24 deletions
45
Jenkinsfile
vendored
45
Jenkinsfile
vendored
|
@ -5,33 +5,34 @@ pipeline {
|
|||
steps {
|
||||
echo 'Running build automation'
|
||||
sh './mvnw package'
|
||||
archiveArtifacts artifacts: '/trainSchedule.zip'
|
||||
}
|
||||
}
|
||||
stage('Build Docker Image') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
app = docker.build("sprientera/pets")
|
||||
app.inside {
|
||||
sh 'echo $(curl localhost:80)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Push Docker Image') {
|
||||
when {
|
||||
branch 'master'
|
||||
stage('Build Docker Image') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
app = docker.build("sprientera/pet")
|
||||
app.inside {
|
||||
sh 'echo $(curl localhost:8080)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') {
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
stage('Push Docker Image') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') {
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue