mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
add dockerfiles and jenkinsfile
This commit is contained in:
parent
ad4f3e65ef
commit
adadcfa0c0
1273 changed files with 1046 additions and 30 deletions
9
Dockerfile1
Normal file
9
Dockerfile1
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
FROM eclipse-temurin:17-jre-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY target/spring-petclinic-3.1.5-SNAPSHOT.jar app.jar
|
||||||
|
|
||||||
|
RUN apk update && apk add openssl
|
||||||
|
|
||||||
|
CMD ["java", "-jar", "app.jar"]
|
21
Dockerfile2
Normal file
21
Dockerfile2
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
FROM eclipse-temurin:17-jdk-alpine as build1
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY .mvn/ .mvn
|
||||||
|
COPY mvnw pom.xml ./
|
||||||
|
RUN ./mvnw dependency:resolve
|
||||||
|
|
||||||
|
COPY src ./src
|
||||||
|
|
||||||
|
RUN ["./mvnw", "package"]
|
||||||
|
|
||||||
|
FROM eclipse-temurin:17-jre-alpine as build2
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
RUN apk update && apk add openssl
|
||||||
|
COPY --from=build2 /opt/java/openjdk /opt/java/openjdk
|
||||||
|
COPY --from=build1 /app/target/*.jar /app.jar
|
||||||
|
CMD ["/opt/java/openjdk/bin/java", "-jar", "/app.jar"]
|
||||||
|
|
14
Jenkinsfile
vendored
Normal file
14
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
pipeline{
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage ("build") {
|
||||||
|
steps {
|
||||||
|
echo "Running build automation..."
|
||||||
|
sh 'mvn checkstyle:checkstyle'
|
||||||
|
sh 'mvn verify'
|
||||||
|
sh 'mvn clean package'
|
||||||
|
sh 'docker build -t mr/spring-petclinic:${GIT_COMMIT:0:7} -f Dockerfile2 .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,20 +1,14 @@
|
||||||
version: "2.2"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
app:
|
||||||
image: mysql:8.0
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile2
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "8080:8080"
|
||||||
environment:
|
links:
|
||||||
- MYSQL_ROOT_PASSWORD=
|
- postgres
|
||||||
- MYSQL_ALLOW_EMPTY_PASSWORD=true
|
|
||||||
- MYSQL_USER=petclinic
|
|
||||||
- MYSQL_PASSWORD=petclinic
|
|
||||||
- MYSQL_DATABASE=petclinic
|
|
||||||
volumes:
|
|
||||||
- "./conf.d:/etc/mysql/conf.d:ro"
|
|
||||||
profiles:
|
|
||||||
- mysql
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15.3
|
image: postgres:15.3
|
||||||
ports:
|
ports:
|
||||||
|
@ -23,5 +17,5 @@ services:
|
||||||
- POSTGRES_PASSWORD=petclinic
|
- POSTGRES_PASSWORD=petclinic
|
||||||
- POSTGRES_USER=petclinic
|
- POSTGRES_USER=petclinic
|
||||||
- POSTGRES_DB=petclinic
|
- POSTGRES_DB=petclinic
|
||||||
profiles:
|
volumes:
|
||||||
- postgres
|
- ./postgres-data:/var/lib/postgresql/data
|
||||||
|
|
31
pom.xml
31
pom.xml
|
@ -3,18 +3,8 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.springframework.samples</groupId>
|
<groupId>org.springframework.samples</groupId>
|
||||||
<artifactId>spring-petclinic</artifactId>
|
<artifactId>spring-petclinic</artifactId>
|
||||||
<version>3.1.5-SNAPSHOT</version>
|
<version>3.1.6-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<distributionManagement>
|
|
||||||
<snapshotRepository>
|
|
||||||
<id>nexus-snapshots</id>
|
|
||||||
<url>http://localhost:8080/repository/maven-snapshots/</url>
|
|
||||||
</snapshotRepository>
|
|
||||||
<repository>
|
|
||||||
<id>nexus-releases</id>
|
|
||||||
<url>http://localhost:8080/repository/maven-releases/</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
@ -28,7 +18,7 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set -DnewVersion=... -->
|
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set -DnewVersion=... -->
|
||||||
<project.build.outputTimestamp>2023-10-27T10:51:31Z</project.build.outputTimestamp>
|
<project.build.outputTimestamp>2023-11-13T12:41:24Z</project.build.outputTimestamp>
|
||||||
|
|
||||||
<!-- Web dependencies -->
|
<!-- Web dependencies -->
|
||||||
<webjars-bootstrap.version>5.2.3</webjars-bootstrap.version>
|
<webjars-bootstrap.version>5.2.3</webjars-bootstrap.version>
|
||||||
|
@ -470,5 +460,20 @@
|
||||||
<url>https://github.com/surtexx/spring-petclinic.git</url>
|
<url>https://github.com/surtexx/spring-petclinic.git</url>
|
||||||
<tag>spring-petclinic-3.1.4</tag>
|
<tag>spring-petclinic-3.1.4</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<version>3.3.1</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>checkstyle</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
</project>
|
</project>
|
||||||
|
|
1
postgres-data/PG_VERSION
Normal file
1
postgres-data/PG_VERSION
Normal file
|
@ -0,0 +1 @@
|
||||||
|
15
|
BIN
postgres-data/base/1/112
Normal file
BIN
postgres-data/base/1/112
Normal file
Binary file not shown.
BIN
postgres-data/base/1/113
Normal file
BIN
postgres-data/base/1/113
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1247
Normal file
BIN
postgres-data/base/1/1247
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1247_fsm
Normal file
BIN
postgres-data/base/1/1247_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1247_vm
Normal file
BIN
postgres-data/base/1/1247_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1249
Normal file
BIN
postgres-data/base/1/1249
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1249_fsm
Normal file
BIN
postgres-data/base/1/1249_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1249_vm
Normal file
BIN
postgres-data/base/1/1249_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1255
Normal file
BIN
postgres-data/base/1/1255
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1255_fsm
Normal file
BIN
postgres-data/base/1/1255_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1255_vm
Normal file
BIN
postgres-data/base/1/1255_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1259
Normal file
BIN
postgres-data/base/1/1259
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1259_fsm
Normal file
BIN
postgres-data/base/1/1259_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/1259_vm
Normal file
BIN
postgres-data/base/1/1259_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13393
Normal file
BIN
postgres-data/base/1/13393
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13393_fsm
Normal file
BIN
postgres-data/base/1/13393_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13393_vm
Normal file
BIN
postgres-data/base/1/13393_vm
Normal file
Binary file not shown.
0
postgres-data/base/1/13396
Normal file
0
postgres-data/base/1/13396
Normal file
BIN
postgres-data/base/1/13397
Normal file
BIN
postgres-data/base/1/13397
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13398
Normal file
BIN
postgres-data/base/1/13398
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13398_fsm
Normal file
BIN
postgres-data/base/1/13398_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13398_vm
Normal file
BIN
postgres-data/base/1/13398_vm
Normal file
Binary file not shown.
0
postgres-data/base/1/13401
Normal file
0
postgres-data/base/1/13401
Normal file
BIN
postgres-data/base/1/13402
Normal file
BIN
postgres-data/base/1/13402
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13403
Normal file
BIN
postgres-data/base/1/13403
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13403_fsm
Normal file
BIN
postgres-data/base/1/13403_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13403_vm
Normal file
BIN
postgres-data/base/1/13403_vm
Normal file
Binary file not shown.
0
postgres-data/base/1/13406
Normal file
0
postgres-data/base/1/13406
Normal file
BIN
postgres-data/base/1/13407
Normal file
BIN
postgres-data/base/1/13407
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13408
Normal file
BIN
postgres-data/base/1/13408
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13408_fsm
Normal file
BIN
postgres-data/base/1/13408_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/13408_vm
Normal file
BIN
postgres-data/base/1/13408_vm
Normal file
Binary file not shown.
0
postgres-data/base/1/13411
Normal file
0
postgres-data/base/1/13411
Normal file
BIN
postgres-data/base/1/13412
Normal file
BIN
postgres-data/base/1/13412
Normal file
Binary file not shown.
0
postgres-data/base/1/1417
Normal file
0
postgres-data/base/1/1417
Normal file
0
postgres-data/base/1/1418
Normal file
0
postgres-data/base/1/1418
Normal file
BIN
postgres-data/base/1/174
Normal file
BIN
postgres-data/base/1/174
Normal file
Binary file not shown.
BIN
postgres-data/base/1/175
Normal file
BIN
postgres-data/base/1/175
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2187
Normal file
BIN
postgres-data/base/1/2187
Normal file
Binary file not shown.
0
postgres-data/base/1/2224
Normal file
0
postgres-data/base/1/2224
Normal file
BIN
postgres-data/base/1/2228
Normal file
BIN
postgres-data/base/1/2228
Normal file
Binary file not shown.
0
postgres-data/base/1/2328
Normal file
0
postgres-data/base/1/2328
Normal file
0
postgres-data/base/1/2336
Normal file
0
postgres-data/base/1/2336
Normal file
BIN
postgres-data/base/1/2337
Normal file
BIN
postgres-data/base/1/2337
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2579
Normal file
BIN
postgres-data/base/1/2579
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2600
Normal file
BIN
postgres-data/base/1/2600
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2600_fsm
Normal file
BIN
postgres-data/base/1/2600_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2600_vm
Normal file
BIN
postgres-data/base/1/2600_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2601
Normal file
BIN
postgres-data/base/1/2601
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2601_fsm
Normal file
BIN
postgres-data/base/1/2601_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2601_vm
Normal file
BIN
postgres-data/base/1/2601_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2602
Normal file
BIN
postgres-data/base/1/2602
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2602_fsm
Normal file
BIN
postgres-data/base/1/2602_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2602_vm
Normal file
BIN
postgres-data/base/1/2602_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2603
Normal file
BIN
postgres-data/base/1/2603
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2603_fsm
Normal file
BIN
postgres-data/base/1/2603_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2603_vm
Normal file
BIN
postgres-data/base/1/2603_vm
Normal file
Binary file not shown.
0
postgres-data/base/1/2604
Normal file
0
postgres-data/base/1/2604
Normal file
BIN
postgres-data/base/1/2605
Normal file
BIN
postgres-data/base/1/2605
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2605_fsm
Normal file
BIN
postgres-data/base/1/2605_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2605_vm
Normal file
BIN
postgres-data/base/1/2605_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2606
Normal file
BIN
postgres-data/base/1/2606
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2606_fsm
Normal file
BIN
postgres-data/base/1/2606_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2606_vm
Normal file
BIN
postgres-data/base/1/2606_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2607
Normal file
BIN
postgres-data/base/1/2607
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2607_fsm
Normal file
BIN
postgres-data/base/1/2607_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2607_vm
Normal file
BIN
postgres-data/base/1/2607_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2608
Normal file
BIN
postgres-data/base/1/2608
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2608_fsm
Normal file
BIN
postgres-data/base/1/2608_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2608_vm
Normal file
BIN
postgres-data/base/1/2608_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2609
Normal file
BIN
postgres-data/base/1/2609
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2609_fsm
Normal file
BIN
postgres-data/base/1/2609_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2609_vm
Normal file
BIN
postgres-data/base/1/2609_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2610
Normal file
BIN
postgres-data/base/1/2610
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2610_fsm
Normal file
BIN
postgres-data/base/1/2610_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2610_vm
Normal file
BIN
postgres-data/base/1/2610_vm
Normal file
Binary file not shown.
0
postgres-data/base/1/2611
Normal file
0
postgres-data/base/1/2611
Normal file
BIN
postgres-data/base/1/2612
Normal file
BIN
postgres-data/base/1/2612
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2612_fsm
Normal file
BIN
postgres-data/base/1/2612_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2612_vm
Normal file
BIN
postgres-data/base/1/2612_vm
Normal file
Binary file not shown.
0
postgres-data/base/1/2613
Normal file
0
postgres-data/base/1/2613
Normal file
BIN
postgres-data/base/1/2615
Normal file
BIN
postgres-data/base/1/2615
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2615_fsm
Normal file
BIN
postgres-data/base/1/2615_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2615_vm
Normal file
BIN
postgres-data/base/1/2615_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2616
Normal file
BIN
postgres-data/base/1/2616
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2616_fsm
Normal file
BIN
postgres-data/base/1/2616_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2616_vm
Normal file
BIN
postgres-data/base/1/2616_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2617
Normal file
BIN
postgres-data/base/1/2617
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2617_fsm
Normal file
BIN
postgres-data/base/1/2617_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2617_vm
Normal file
BIN
postgres-data/base/1/2617_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2618
Normal file
BIN
postgres-data/base/1/2618
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2618_fsm
Normal file
BIN
postgres-data/base/1/2618_fsm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2618_vm
Normal file
BIN
postgres-data/base/1/2618_vm
Normal file
Binary file not shown.
BIN
postgres-data/base/1/2619
Normal file
BIN
postgres-data/base/1/2619
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue