mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:15:49 +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 {
|
pipeline {
|
||||||
agent any
|
agent {label "slave"}
|
||||||
stages {
|
stages {
|
||||||
stage("build") {
|
stage("build") {
|
||||||
steps {
|
steps {
|
||||||
sh "pwd"
|
sh "pwd"
|
||||||
sh "ls -lrtha"
|
sh "ls -lrtha"
|
||||||
sh "cd spring-petclinic"
|
dir("spring-petclinic") {
|
||||||
sh "./mvnw package"
|
sh "./mvnw package"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
stage("deploy") {
|
stage("deploy") {
|
||||||
steps {
|
steps {
|
||||||
sh "cd spring-petclinic"
|
dir("spring-petclinic") {
|
||||||
sh """
|
sh """
|
||||||
docker build -t pet-clinic:1.0 .
|
docker build -t pet-clinic:1.0 .
|
||||||
docker run -d -p 8080:8080 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