This commit is contained in:
loxon-featurelab 2018-01-29 22:21:02 +00:00 committed by GitHub
commit 96e43a37b1
3 changed files with 42 additions and 0 deletions

7
Dockerfile Normal file
View file

@ -0,0 +1,7 @@
FROM openjdk:8-alpine
COPY target/spring-petclinic-2.0.0.jar /opt/spring-petclinic.jar
EXPOSE 8080
CMD java -Djava.security.egd=file:/dev/./urandom -jar /opt/spring-petclinic.jar

35
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,35 @@
pipeline {
agent any
options {
// Keep only 1 artifact, and many builds
buildDiscarder(logRotator(numToKeepStr: '1000', artifactNumToKeepStr: '0'))
}
stages {
stage('Build the code') {
steps {
script {
docker.image('openjdk:8-jdk-alpine').inside('-v /var/jenkins_home/.m2:/root/.m2') {
sh '''
./mvnw clean package -DskipTests -T 2
'''
}
}
}
}
stage('Build the image') {
steps {
script {
docker.build("loxon/petclinic:2.0.0").push()
}
}
}
}
}

0
test.txt Normal file
View file