diff --git a/Jenkinsfile b/Jenkinsfile index 59d35845313c2e8ee043d03b8863b9c72f4c7558..adf2775528191228c7227f57f19ea10d84066e70 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -73,10 +73,9 @@ pipeline { script { FAILED_STAGE=env.STAGE_NAME } - IMAGE_TAG = generateImageTag() 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){ withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: '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}" } } diff --git a/pom.xml b/pom.xml index 1a7c09386d4cfe4e4435a4540a005bb4cd74bbf6..512c5b63d450864f3f0b4e10742bc63e82be0a75 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <image> - <name>docker.ozg-sh.de/administration:${tag}</name> + <name>docker.ozg-sh.de/administration:build-latest</name> </image> <excludes> <exclude>