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

OZG-4786 OZG-4792 Take correct username and password to push dockerfiles (Jenkins)

parent 62f727a6
No related branches found
No related tags found
No related merge requests found
...@@ -75,8 +75,11 @@ pipeline { ...@@ -75,8 +75,11 @@ pipeline {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
} }
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 -Dbuildtag=$IMAGE_TAG -Dspring-boot.build-image.publish=true' withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh 'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3 -Dbuildtag=$IMAGE_TAG -Dspring-boot.build-image.publish=true -Duser ${USER} -Dpassword ${PASSWORD}'
}
} }
} }
} }
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
</image> </image>
<docker> <docker>
<publishRegistry> <publishRegistry>
<username>USER</username> <username>${user}</username>
<password>PASSWORD</password> <password>${password}</password>
</publishRegistry> </publishRegistry>
</docker> </docker>
<excludes> <excludes>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment