Skip to content
Snippets Groups Projects
Commit 70f75a64 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4786 OZG-4792 Assign docker image tag when built

parent cdf2c8bf
No related branches found
No related tags found
No related merge requests found
...@@ -72,10 +72,11 @@ pipeline { ...@@ -72,10 +72,11 @@ pipeline {
steps { steps {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
IMAGE_TAG = generateImageTag()
} }
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3' sh 'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3 -Dbuildtag=$IMAGE_TAG'
} }
} }
} }
...@@ -84,7 +85,7 @@ pipeline { ...@@ -84,7 +85,7 @@ pipeline {
steps { steps {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
IMAGE_TAG = generateImageTag()
tagAndPushDockerImage(IMAGE_TAG) tagAndPushDockerImage(IMAGE_TAG)
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<image> <image>
<name>docker.ozg-sh.de/administration:build-latest</name> <name>docker.ozg-sh.de/administration:${buildtag}</name>
</image> </image>
<excludes> <excludes>
<exclude> <exclude>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment