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

OZG-4786 OZG-4792 Revert to build on Jenkins

parent cb75ec5c
No related branches found
No related tags found
No related merge requests found
...@@ -73,10 +73,9 @@ pipeline { ...@@ -73,10 +73,9 @@ pipeline {
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 -Dtag=$IMAGE_TAG' sh 'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3'
} }
} }
} }
...@@ -175,7 +174,7 @@ Void tagAndPushDockerImage(String newTag){ ...@@ -175,7 +174,7 @@ Void tagAndPushDockerImage(String newTag){
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh "docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}" sh "docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}"
// sh "docker tag docker.ozg-sh.de/administration:build-latest docker.ozg-sh.de/administration:${newTag}" sh "docker tag docker.ozg-sh.de/administration:build-latest docker.ozg-sh.de/administration:${newTag}"
sh "docker push docker.ozg-sh.de/administration:${newTag}" sh "docker push docker.ozg-sh.de/administration:${newTag}"
} }
} }
......
...@@ -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:${tag}</name> <name>docker.ozg-sh.de/administration:build-latest</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