Skip to content

Commit d6e71d4

Browse files
committed
Authenticate with artifactory.
See #367.
1 parent f86f19c commit d6e71d4

File tree

4 files changed

+51
-10
lines changed

4 files changed

+51
-10
lines changed

Jenkinsfile

+14-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ pipeline {
2323
label 'data'
2424
}
2525
options { timeout(time: 30, unit: 'MINUTES') }
26+
environment {
27+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
28+
}
2629
steps {
2730
script {
2831
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
2932
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
30-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw clean dependency:list test -Dsort -U -B'
33+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list test -Dsort -U -B'
3134
}
3235
}
3336
}
@@ -47,11 +50,14 @@ pipeline {
4750
label 'data'
4851
}
4952
options { timeout(time: 30, unit: 'MINUTES') }
53+
environment {
54+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
55+
}
5056
steps {
5157
script {
5258
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
5359
docker.image('adoptopenjdk/openjdk11:latest').inside('-v $HOME:/tmp/jenkins-home') {
54-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean dependency:list test -Dsort -U -B'
60+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list test -Dsort -U -B'
5561
}
5662
}
5763
}
@@ -63,11 +69,14 @@ pipeline {
6369
label 'data'
6470
}
6571
options { timeout(time: 30, unit: 'MINUTES') }
72+
environment {
73+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
74+
}
6675
steps {
6776
script {
6877
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
6978
docker.image('adoptopenjdk/openjdk15:latest').inside('-v $HOME:/tmp/jenkins-home') {
70-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean dependency:list test -Dsort -U -B'
79+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjava11 clean dependency:list test -Dsort -U -B'
7180
}
7281
}
7382
}
@@ -96,7 +105,7 @@ pipeline {
96105
script {
97106
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
98107
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
99-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
108+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' +
100109
'-Dartifactory.server=https://repo.spring.io ' +
101110
"-Dartifactory.username=${ARTIFACTORY_USR} " +
102111
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
@@ -126,7 +135,7 @@ pipeline {
126135
script {
127136
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
128137
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
129-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
138+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
130139
'-Dartifactory.server=https://repo.spring.io ' +
131140
"-Dartifactory.username=${ARTIFACTORY_USR} " +
132141
"-Dartifactory.password=${ARTIFACTORY_PSW} " +

LICENSE.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@
179179
APPENDIX: How to apply the Apache License to your work.
180180

181181
To apply the Apache License to your work, attach the following
182-
boilerplate notice, with the fields enclosed by brackets "[]"
182+
boilerplate notice, with the fields enclosed by brackets "{}"
183183
replaced with your own identifying information. (Don't include
184184
the brackets!) The text should be enclosed in the appropriate
185185
comment syntax for the file format. We also recommend that a
186186
file or class name and description of purpose be included on the
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright [yyyy] [name of copyright owner]
190+
Copyright {yyyy} {name of copyright owner}
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

pom.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@
9797

9898
<pluginRepositories>
9999
<pluginRepository>
100-
<id>bintray-plugins</id>
101-
<name>bintray-plugins</name>
102-
<url>https://jcenter.bintray.com</url>
100+
<id>spring-plugins-release</id>
101+
<url>https://repo.spring.io/plugins-release</url>
102+
</pluginRepository>
103+
<pluginRepository>
104+
<id>spring-libs-milestone</id>
105+
<url>https://repo.spring.io/libs-milestone</url>
103106
</pluginRepository>
104107
</pluginRepositories>
105108

settings.xml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
https://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<servers>
7+
<server>
8+
<id>spring-plugins-release</id>
9+
<username>${env.ARTIFACTORY_USR}</username>
10+
<password>${env.ARTIFACTORY_PSW}</password>
11+
</server>
12+
<server>
13+
<id>spring-libs-snapshot</id>
14+
<username>${env.ARTIFACTORY_USR}</username>
15+
<password>${env.ARTIFACTORY_PSW}</password>
16+
</server>
17+
<server>
18+
<id>spring-libs-milestone</id>
19+
<username>${env.ARTIFACTORY_USR}</username>
20+
<password>${env.ARTIFACTORY_PSW}</password>
21+
</server>
22+
<server>
23+
<id>spring-libs-release</id>
24+
<username>${env.ARTIFACTORY_USR}</username>
25+
<password>${env.ARTIFACTORY_PSW}</password>
26+
</server>
27+
</servers>
28+
29+
</settings>

0 commit comments

Comments
 (0)