mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
Add Dockerfile and Jenkinsfile
This commit is contained in:
parent
22caee3d03
commit
b51b95031b
2 changed files with 28 additions and 0 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal file
|
@ -0,0 +1,17 @@
|
|||
FROM maven:3.9.9-eclipse-temurin-17 AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN ./mvnw package -DskipTests
|
||||
|
||||
FROM eclipse-temurin:21-jdk-jammy
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder build/target/spring-petclinic-4.0.1.jar /app/spring-petclinic.jar
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "/app/spring-petclinic.jar"]
|
||||
|
||||
EXPOSE 8080
|
11
Jenkinsfile
vendored
Normal file
11
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage ('Checkstyle') {
|
||||
steps {
|
||||
sh 'mvn validate'
|
||||
archiveArtifacts artifacts: 'target/checkstyle-report.xml', allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue