mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:05:50 +00:00
Update Jenkinsfile
This commit is contained in:
parent
14c6784fd7
commit
9f6cc885e0
1 changed files with 5 additions and 3 deletions
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
@ -1,17 +1,18 @@
|
|||
pipeline {
|
||||
agent any
|
||||
agent {label "slave"}
|
||||
stages {
|
||||
stage("build") {
|
||||
steps {
|
||||
sh "pwd"
|
||||
sh "ls -lrtha"
|
||||
sh "cd spring-petclinic"
|
||||
dir("spring-petclinic") {
|
||||
sh "./mvnw package"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("deploy") {
|
||||
steps {
|
||||
sh "cd spring-petclinic"
|
||||
dir("spring-petclinic") {
|
||||
sh """
|
||||
docker build -t pet-clinic:1.0 .
|
||||
docker run -d -p 8080:8080 pet-clinic:1.0
|
||||
|
@ -20,3 +21,4 @@ stages {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue