mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Merge 7ead370d23
into 6730a229a0
This commit is contained in:
commit
96e43a37b1
3 changed files with 42 additions and 0 deletions
7
Dockerfile
Normal file
7
Dockerfile
Normal 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
35
Jenkinsfile
vendored
Normal 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
0
test.txt
Normal file
Loading…
Reference in a new issue