another fix

This commit is contained in:
hllvc 2021-07-13 17:14:07 +02:00
parent c114ec8432
commit 0c1ab03281
2 changed files with 18 additions and 1 deletions

View file

@ -1,3 +1,4 @@
FROM openjdk:8-jdk-alpine
WORKDIR /build
CMD [ "./build.sh" ]
COPY build.sh .

18
Jenkinsfile vendored
View file

@ -14,11 +14,27 @@ pipeline {
}
steps {
script {
sh 'docker cp petclinic-build:/build/target/app.jar .'
echo 'Done'
}
}
}
stage('Copy .jar file') {
agent {
docker {
image 'docker:dind'
additionalBuildArgs '-t petclinic-build'
args '-v /var/run/docker.sock:/var/run/docker.sock'
}
}
steps {
sh """docker run -d --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
--name petclinic-build
petclinic-build"""
}
}
stage('Run') {
agent {
dockerfile {