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
Branches
Tags
No related merge requests found
......@@ -75,8 +75,11 @@ pipeline {
FAILED_STAGE=env.STAGE_NAME
}
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 @@
</image>
<docker>
<publishRegistry>
<username>USER</username>
<password>PASSWORD</password>
<username>${user}</username>
<password>${password}</password>
</publishRegistry>
</docker>
<excludes>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment