mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 09:25:49 +00:00
another fix
This commit is contained in:
parent
ed4de7150a
commit
dd650e987d
3 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,5 @@
|
|||
FROM openjdk:8-jdk-alpine
|
||||
WORKDIR /build
|
||||
CMD [ "./build.sh" ]
|
||||
RUN apk add bash git
|
||||
COPY build.sh .
|
||||
|
|
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
|
@ -10,7 +10,7 @@ pipeline {
|
|||
filename 'Dockerfile.build'
|
||||
dir '.'
|
||||
additionalBuildArgs '-t petclinic-build'
|
||||
args '-v $HOME/.m2:/root/.m2 --name petclinic-build'
|
||||
args '-v $HOME/.m2:/root/.m2'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
|
@ -24,14 +24,13 @@ pipeline {
|
|||
agent {
|
||||
docker {
|
||||
image 'docker:dind'
|
||||
args '-v /var/run/docker.sock:/var/run/docker.sock'
|
||||
args '-v /var/run/docker.sock:/var/run/docker.sock --user root'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh """docker run -d --rm \
|
||||
sh """docker run -d \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
--name petclinic-build
|
||||
petclinic-build"""
|
||||
--name petclinic-build petclinic-build"""
|
||||
sh 'docker cp petclinic-build:/build/target/app.jar .'
|
||||
}
|
||||
}
|
||||
|
|
4
build.sh
4
build.sh
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -f spring-petclinic ]]; then
|
||||
if [[ -e spring-petclinic ]]; then
|
||||
cd spring-petclinic
|
||||
git chekcout jenkins
|
||||
git checkout jenkins
|
||||
git pull jenkins
|
||||
else
|
||||
git clone https://github.com/hllvc/spring-petclinic.git
|
||||
|
|
Loading…
Reference in a new issue