diff --git a/notification-service/Dockerfile b/notification-service/Dockerfile index 2cd0151de..0d10c0017 100644 --- a/notification-service/Dockerfile +++ b/notification-service/Dockerfile @@ -3,8 +3,11 @@ FROM maven:3.9-eclipse-temurin-17-alpine AS build-stage ARG CITE_MAVEN_ACCOUNT_USR ARG CITE_MAVEN_ACCOUNT_PSW -ENV server_username=$CITE_MAVEN_ACCOUNT_USR -ENV server_password=$CITE_MAVEN_ACCOUNT_PSW +ARG REVISION +ARG PROFILE +ARG DEV_PROFILE_URL +ENV server_username=$MAVEN_ACCOUNT_USR +ENV server_password=$MAVEN_ACCOUNT_PSW COPY pom.xml /build/ COPY notification /build/notification/ @@ -17,13 +20,16 @@ RUN rm -f /build/notification-web/src/main/resources/certificates/*.crt WORKDIR /build/ -RUN mvn -Dserver.username=${CITE_MAVEN_ACCOUNT_USR} -Dserver.password=${CITE_MAVEN_ACCOUNT_PSW} dependency:go-offline +RUN mvn -Drevision=${REVISION} -DdevProfileUrl=${DEV_PROFILE_URL} -P${PROFILE} dependency:go-offline # Build project -RUN mvn -Dserver.username=${CITE_MAVEN_ACCOUNT_USR} -Dserver.password=${CITE_MAVEN_ACCOUNT_PSW} clean package +RUN mvn -Drevision=${REVISION} -DdevProfileUrl=${DEV_PROFILE_URL} -P${PROFILE} clean package ######################################## Run Stage ######################################## FROM eclipse-temurin:17-jre-ubi9-minimal +ARG PROFILE +ARG REVISION + COPY --from=build-stage /build/notification-web/target/sti-viewer-notification-web.jar /app/sti-viewer-notification-web.jar ENTRYPOINT ["java","-Dspring.config.additional-location=file:/config/","-Dspring.profiles.active=${PROFILE}","-Djava.security.egd=file:/dev/./urandom","-jar","/app/sti-viewer-notification-web.jar"] \ No newline at end of file diff --git a/notification-service/settings.xml b/notification-service/settings.xml index 044f36492..e9465c40f 100644 --- a/notification-service/settings.xml +++ b/notification-service/settings.xml @@ -8,5 +8,25 @@ ${server.username} ${server.password} + + dev + ${server_username} + ${server_password} + + + + dev + + + true + + + dev + Dev Profile + ${devProfileUrl} + + + +