mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 09:25:49 +00:00
fix Jenkinsfile
This commit is contained in:
parent
5c5ea6e1fa
commit
ec29105d6a
1 changed files with 12 additions and 8 deletions
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
|
@ -9,22 +9,26 @@ pipeline {
|
|||
stages {
|
||||
|
||||
stage('Build') {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile.build'
|
||||
dir '.'
|
||||
additionalBuildArgs '-t petclinic-build'
|
||||
args '$HOME/.m2:/root/.m2'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
BUILD_CONTAINER_ID = "sh 'docker run -v $HOME/.m2:/root/.m2 -d petclinic-build'"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run') {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile.run'
|
||||
additionalBuildArgs '-t petclinic-run'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'docker cp ${BUILD_CONTAINER_ID}:/build/target/app.jar .'
|
||||
sh 'docker-compose up'
|
||||
|
|
Loading…
Reference in a new issue