File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ jobs:
3737 echo "No Gradle project found"; exit 1
3838 fi
3939
40- - name : Build & Test
40+ - name : Test
4141 env :
4242 MAIL_PASSWORD : ${{ secrets.CI_MAIL_PASSWORD }}
4343 MAIL_USERNAME : ${{ secrets.CI_MAIL_USERNAME }}
4444 MONGO_URI : ${{ secrets.CI_MONGO_URI }}
4545 run : |
4646 cd "${{ steps.detect.outputs.dir }}"
4747 chmod +x ./gradlew || true
48- ./gradlew clean test bootJar
48+ ./gradlew clean test --no-daemon
4949
5050 - name : Find Dockerfile
5151 id : df
Original file line number Diff line number Diff line change 1+ # ---- Build Stage ----
2+ FROM eclipse-temurin:21-jdk-alpine AS builder
3+
4+ WORKDIR /workspace
5+
6+ COPY gradlew ./gradlew
7+ COPY gradle ./gradle
8+ COPY build.gradle* settings.gradle* ./
9+ RUN chmod +x ./gradlew
10+
11+ RUN ./gradlew --no-daemon dependencies || true
12+
13+ COPY . .
14+
15+ RUN ./gradlew clean bootJar -x test --no-daemon
16+
17+ # ---- Runtime Stage ----
118FROM eclipse-temurin:21-jre-alpine
219
320RUN addgroup -S app && adduser -S app -G app
421RUN apk add --no-cache wget
522
623WORKDIR /app
724
8- COPY --chown=app:app app .jar /app/app.jar
25+ COPY --from=builder -- chown=app:app /workspace/build/libs/* .jar /app/app.jar
926
10- # ENV JAVA_OPTS="-Xms256m -Xmx512m" \
11- # SERVER_PORT=8080 \
12- # TZ=Asia/Seoul
13-
1427ENV JAVA_OPTS="-XX:MaxRAMPercentage=75 -XX:+UseG1GC -Duser.timezone=Asia/Seoul"
1528
1629EXPOSE 8080
You can’t perform that action at this time.
0 commit comments