fix: resolved minor issues (#42)
Release package / release (push) Successful in 28m53s

Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Reviewed-on: #42
This commit was merged in pull request #42.
This commit is contained in:
2026-05-04 03:17:03 +00:00
parent 9711ea045e
commit be90005115
9 changed files with 23 additions and 113 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ plugins:
- - "@semantic-release/exec" - - "@semantic-release/exec"
- prepareCmd: | - prepareCmd: |
./mvnw versions:set -DnewVersion=${nextRelease.version} && ./mvnw versions:set -DnewVersion=${nextRelease.version} &&
sed -i "/image:.*-service:/ s|:[^:]*$|:${nextRelease.version}|" k8s/*.yaml && sed -i "/image:.*-service:/ s|:[^:]*$|:${nextRelease.version}|" k8s/base/*.yaml &&
if [ "${branch.name}" = "main" ]; then if [ "${branch.name}" = "main" ]; then
./mvnw package -B -Pnative -Dquarkus.container-image.tag=${nextRelease.version} -DskipTests ./mvnw package -B -Pnative -Dquarkus.container-image.tag=${nextRelease.version} -DskipTests
fi fi
@@ -1,5 +1,8 @@
#### ####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
# #
# Before building the container image run: # Before building the container image run:
# #
@@ -7,16 +10,16 @@
# #
# Then, build the image with: # Then, build the image with:
# #
# docker build -f src/main/docker/Dockerfile.native -t quarkus/account-service . # docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/account-service .
# #
# Then run the container using: # Then run the container using:
# #
# docker run -i --rm -p 8080:8080 quarkus/account-service # docker run -i --rm -p 8080:8080 quarkus/account-service
# #
# The ` registry.access.redhat.com/ubi9/ubi-minimal:9.7` base image is based on UBI 9. # The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9.
# To use UBI 8, switch to `quay.io/ubi8/ubi-minimal:8.10`. # To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`.
### ###
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7 FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0
WORKDIR /work/ WORKDIR /work/
RUN chown 1001 /work \ RUN chown 1001 /work \
&& chmod "g+rwX" /work \ && chmod "g+rwX" /work \
@@ -1,32 +0,0 @@
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
#
# Before building the container image run:
#
# ./mvnw package -Dnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/account-service .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/account-service
#
# The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9.
# To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`.
###
FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root --chmod=0755 target/*-runner /work/application
EXPOSE 8080
USER 1001
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
@@ -1,5 +1,8 @@
#### ####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
# #
# Before building the container image run: # Before building the container image run:
# #
@@ -7,16 +10,16 @@
# #
# Then, build the image with: # Then, build the image with:
# #
# docker build -f src/main/docker/Dockerfile.native -t quarkus/eatery-service . # docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/eatery-service .
# #
# Then run the container using: # Then run the container using:
# #
# docker run -i --rm -p 8080:8080 quarkus/eatery-service # docker run -i --rm -p 8080:8080 quarkus/eatery-service
# #
# The ` registry.access.redhat.com/ubi9/ubi-minimal:9.7` base image is based on UBI 9. # The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9.
# To use UBI 8, switch to `quay.io/ubi8/ubi-minimal:8.10`. # To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`.
### ###
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7 FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0
WORKDIR /work/ WORKDIR /work/
RUN chown 1001 /work \ RUN chown 1001 /work \
&& chmod "g+rwX" /work \ && chmod "g+rwX" /work \
@@ -1,32 +0,0 @@
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
#
# Before building the container image run:
#
# ./mvnw package -Dnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/eatery-service .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/eatery-service
#
# The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9.
# To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`.
###
FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root --chmod=0755 target/*-runner /work/application
EXPOSE 8080
USER 1001
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
@@ -3,7 +3,6 @@ package com.drinkool.services;
import static io.restassured.RestAssured.given; import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasItems;
import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.hasSize;
@@ -1,5 +1,8 @@
#### ####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
# #
# Before building the container image run: # Before building the container image run:
# #
@@ -7,16 +10,16 @@
# #
# Then, build the image with: # Then, build the image with:
# #
# docker build -f src/main/docker/Dockerfile.native -t quarkus/gateway-service . # docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/gateway-service .
# #
# Then run the container using: # Then run the container using:
# #
# docker run -i --rm -p 8080:8080 quarkus/gateway-service # docker run -i --rm -p 8080:8080 quarkus/gateway-service
# #
# The ` registry.access.redhat.com/ubi9/ubi-minimal:9.7` base image is based on UBI 9. # The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9.
# To use UBI 8, switch to `quay.io/ubi8/ubi-minimal:8.10`. # To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`.
### ###
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7 FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0
WORKDIR /work/ WORKDIR /work/
RUN chown 1001 /work \ RUN chown 1001 /work \
&& chmod "g+rwX" /work \ && chmod "g+rwX" /work \
@@ -1,32 +0,0 @@
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
#
# Before building the container image run:
#
# ./mvnw package -Dnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/gateway-service .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/gateway-service
#
# The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9.
# To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`.
###
FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root --chmod=0755 target/*-runner /work/application
EXPOSE 8080
USER 1001
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
@@ -83,9 +83,7 @@ public class HeaderRolesFilter extends BaseHeaderAuthentication {
.addRole(role) .addRole(role)
.build(); .build();
} catch (Exception e) { } catch (Exception e) {
context.response() context.response().setStatusCode(401).end("InvalidToken");
.setStatusCode(401)
.end("InvalidToken");
} }
return null; return null;