Skip to content

Commit 860fc34

Browse files
committed
Polishing.
Extract Docker and Artifactory credentials into properties file. See #2471
1 parent 521f733 commit 860fc34

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Jenkinsfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ pipeline {
3232
options { timeout(time: 30, unit: 'MINUTES') }
3333

3434
environment {
35-
DOCKER_HUB = credentials('hub.docker.com-springbuildmaster')
36-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
35+
DOCKER_HUB = credentials("${p['docker.credentials']}")
36+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
3737
}
3838

3939
steps {
4040
script {
41-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
41+
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
4242
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
4343
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
4444
sh "PROFILE=none ci/test.sh"
@@ -63,12 +63,12 @@ pipeline {
6363
options { timeout(time: 20, unit: 'MINUTES') }
6464

6565
environment {
66-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
66+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
6767
}
6868

6969
steps {
7070
script {
71-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
71+
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
7272
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
7373
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-neo4j-non-root ' +
7474
'-Dartifactory.server=https://repo.spring.io ' +

0 commit comments

Comments
 (0)