add revision propery

This commit is contained in:
Alexandros Mandilaras 2024-02-22 11:52:47 +02:00
parent b8cd2e3757
commit ec4cf780eb
5 changed files with 15 additions and 9 deletions

View File

@ -30,7 +30,8 @@ FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
ARG PROFILE
ARG REVISION
COPY --from=build-stage /build/web/target/web-1.0.0-SNAPSHOT.jar /app.jar
COPY --from=build-stage /build/web/target/web-${REVISION}.jar /app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom" ,"-Dspring.profiles.active=${PROFILE}","-jar","/app.jar"]

View File

@ -30,5 +30,5 @@ WORKDIR /app
ARG PROFILE
ARG REVISION
COPY --from=build-stage /build/web/target/web-1.0.0-SNAPSHOT.jar /app/app.jar
COPY --from=build-stage /build/web/target/web-${REVISION}.jar /app/app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=${PROFILE}", "-Dspring.config.additional-location=/files/config/", "-cp", "/app/app.jar", "-Dloader.path=/files/repo-jars", "org.springframework.boot.loader.PropertiesLauncher"]

View File

@ -6,12 +6,16 @@
<parent>
<groupId>eu.eudat</groupId>
<artifactId>dmp-backend</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
</parent>
<groupId>eu.eudat</groupId>
<artifactId>core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
<properties>
<revision>1.0.0-SNAPSHOT</revision>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>eu.eudat</groupId>
<artifactId>dmp-backend</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>pom</packaging>
<parent>
@ -30,7 +30,7 @@
<org.junit.version>4.11</org.junit.version>
<log4j.version>1.2.17</log4j.version>
<log4j2.version>2.15.0</log4j2.version>
<revision>1.0.0-SNAPSHOT</revision>
<maven.compiler.release>21</maven.compiler.release>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>

View File

@ -6,20 +6,20 @@
<groupId>dmp-backend</groupId>
<artifactId>web</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>${packaging.type}</packaging>
<parent>
<groupId>eu.eudat</groupId>
<artifactId>dmp-backend</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
</parent>
<dependencies>
<dependency>
<groupId>eu.eudat</groupId>
<artifactId>core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>gr.cite.opendmp</groupId>
@ -273,5 +273,6 @@
<maven.compiler.release>21</maven.compiler.release>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<revision>1.0.0-SNAPSHOT</revision>
</properties>
</project>