Skip to content

Commit c992695

Browse files
feat(spring-databases-example): move spring-oracle-example module
1 parent c1a32c7 commit c992695

File tree

40 files changed

+379
-598
lines changed

40 files changed

+379
-598
lines changed

.github/workflows/label.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# This workflow will triage pull requests and apply a label based on the
2-
# paths that are modified in the pull request.
3-
#
4-
# To use this workflow, you will need to set up a .github/labeler.yml
5-
# file with configuration. For more information, see:
6-
# https://github.com/actions/labeler
7-
81
name: Labeler
92
on: [pull_request_target]
103

.github/workflows/spring-databases-example.yml renamed to .github/workflows/spring-databases-mysql-example.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: spring-databases-example CI Build
1+
name: spring-databases-mysql-example CI Build
22

33
on:
44
pull_request:
55
branches: [master]
66
paths:
7-
- "spring-databases-example/**"
7+
- "spring-databases-example/mysql-example/**"
88
types:
99
- opened
1010
- synchronize
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
defaults:
1919
run:
20-
working-directory: spring-databases-example
20+
working-directory: spring-databases-example/mysql-example
2121
strategy:
2222
matrix:
2323
distribution: [ 'temurin' ]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: spring-databases-oracle-example CI Build
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
paths:
7+
- "spring-databases-example/oracle-example/**"
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
13+
jobs:
14+
15+
integration-tests:
16+
name: Run Unit & Integration Tests
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: spring-databases-example/oracle-example
21+
strategy:
22+
matrix:
23+
distribution: [ 'temurin' ]
24+
java: [ '21' ]
25+
steps:
26+
- uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up JDK ${{ matrix.java }}
31+
uses: actions/[email protected]
32+
with:
33+
java-version: ${{ matrix.java }}
34+
distribution: ${{ matrix.distribution }}
35+
cache: 'maven'
36+
- name: Build and analyze
37+
run: ./mvnw clean verify
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: spring-databases-postgres-example CI Build
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
paths:
7+
- "spring-databases-example/postgres-example/**"
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
13+
jobs:
14+
15+
integration-tests:
16+
name: Run Unit & Integration Tests
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: spring-databases-example/postgres-example
21+
strategy:
22+
matrix:
23+
distribution: [ 'temurin' ]
24+
java: [ '21' ]
25+
steps:
26+
- uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up JDK ${{ matrix.java }}
31+
uses: actions/[email protected]
32+
with:
33+
java-version: ${{ matrix.java }}
34+
distribution: ${{ matrix.distribution }}
35+
cache: 'maven'
36+
- name: Build and analyze
37+
run: ./mvnw clean verify

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<module>spring-prometheus-grafana-example</module>
1717
<module>spring-keycloak-example</module>
1818
<module>spring-jasper-example</module>
19-
<module>spring-oracle-example</module>
2019
<module>spring-multimodule-example</module>
2120
<module>spring-databases-example</module>
2221
</modules>

spring-oracle-example/.github/workflows/maven.yml renamed to spring-databases-example/mysql-example/.github/workflows/maven.yml

File renamed without changes.

spring-oracle-example/.dockerignore renamed to spring-databases-example/oracle-example/.dockerignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Include any files or directories that you don't want to be copied to your
2-
# container here (e.g., local build artifacts, temporary files, etc.).
3-
#
4-
# For more help, visit the .dockerignore file reference guide at
5-
# https://docs.docker.com/go/build-context-dockerignore/
6-
71
**/.DS_Store
82
**/.classpath
93
**/.dockerignore
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI Build
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
distribution: [ 'temurin' ]
15+
java: [ '21' ]
16+
steps:
17+
- uses: actions/checkout@v5
18+
19+
- name: Setup Java 21
20+
uses: actions/setup-java@v5
21+
with:
22+
java-version: ${{ matrix.java }}
23+
distribution: ${{ matrix.distribution }}
24+
cache: 'maven'
25+
26+
- name: Grant execute permission for mvnw
27+
run: chmod +x mvnw
28+
29+
- name: Build with Maven
30+
run: ./mvnw clean verify

spring-oracle-example/.mvn/wrapper/maven-wrapper.properties renamed to spring-databases-example/oracle-example/.mvn/wrapper/maven-wrapper.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
wrapperVersion=3.3.4
12
distributionType=only-script
2-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:25-jdk-jammy as deps
1+
FROM eclipse-temurin:21-jdk-jammy as deps
22

33
WORKDIR /build
44

@@ -18,24 +18,24 @@ RUN --mount=type=bind,source=pom.xml,target=pom.xml \
1818
./mvnw package -DskipTests && \
1919
mv target/$(./mvnw help:evaluate -Dexpression=project.artifactId -q -DforceStdout)-$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout).jar target/app.jar
2020

21-
FROM package as extract
22-
23-
WORKDIR /build
24-
25-
RUN java -Djarmode=layertools -jar target/app.jar extract --destination target/extracted
26-
27-
FROM eclipse-temurin:25-jre-jammy AS final
21+
FROM eclipse-temurin:21-jre-jammy AS final
2822

2923
ARG UID=10001
30-
31-
COPY --from=extract build/target/extracted/dependencies/ ./
32-
COPY --from=extract build/target/extracted/spring-boot-loader/ ./
33-
COPY --from=extract build/target/extracted/snapshot-dependencies/ ./
34-
COPY --from=extract build/target/extracted/application/ ./
24+
RUN adduser \
25+
--disabled-password \
26+
--gecos "" \
27+
--home "/nonexistent" \
28+
--shell "/sbin/nologin" \
29+
--no-create-home \
30+
--uid "${UID}" \
31+
appuser
32+
USER appuser
33+
34+
COPY --from=package build/target/app.jar app.jar
3535

3636
COPY docker/java/entrypoint.sh /entrypoint.sh
3737
RUN chmod +x /entrypoint.sh
3838

39-
EXPOSE 8080
39+
EXPOSE 8082
4040

41-
ENTRYPOINT ["/entrypoint.sh"]
41+
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)