Skip to content

Commit acf6ddc

Browse files
authored
Migrate build to Spring Develocity Conventions extension.
* Migrate build to Spring Develocity Conventions extension. * Adopt Develocity environment variables. Closes #3552
1 parent 3191b88 commit acf6ddc

File tree

7 files changed

+10
-62
lines changed

7 files changed

+10
-62
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ node_modules
1212
package-lock.json
1313
node
1414
build/
15-
.mvn/.gradle-enterprise
15+
.mvn/.develocity

.mvn/extensions.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<extensions>
33
<extension>
4-
<groupId>com.gradle</groupId>
5-
<artifactId>gradle-enterprise-maven-extension</artifactId>
6-
<version>1.18.1</version>
4+
<groupId>io.spring.develocity.conventions</groupId>
5+
<artifactId>develocity-conventions-maven-extension</artifactId>
6+
<version>0.0.19</version>
77
</extension>
8-
<extension>
9-
<groupId>com.gradle</groupId>
10-
<artifactId>common-custom-user-data-maven-extension</artifactId>
11-
<version>1.12.2</version>
12-
</extension>
13-
</extensions>
8+
</extensions>

.mvn/gradle-enterprise.xml

Lines changed: 0 additions & 31 deletions
This file was deleted.

Jenkinsfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ pipeline {
3232
options { timeout(time: 30, unit: 'MINUTES') }
3333
environment {
3434
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
35-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
3635
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
3736
TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor'
3837
}
@@ -66,7 +65,6 @@ pipeline {
6665
options { timeout(time: 30, unit: 'MINUTES')}
6766
environment {
6867
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
69-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
7068
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
7169
TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor'
7270
}
@@ -89,7 +87,6 @@ pipeline {
8987
options { timeout(time: 30, unit: 'MINUTES')}
9088
environment {
9189
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
92-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
9390
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
9491
TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor'
9592
}
@@ -112,7 +109,6 @@ pipeline {
112109
options { timeout(time: 30, unit: 'MINUTES')}
113110
environment {
114111
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
115-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
116112
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
117113
TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor'
118114
}
@@ -135,7 +131,6 @@ pipeline {
135131
options { timeout(time: 30, unit: 'MINUTES')}
136132
environment {
137133
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
138-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
139134
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
140135
TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor'
141136
}
@@ -158,7 +153,6 @@ pipeline {
158153
options { timeout(time: 30, unit: 'MINUTES')}
159154
environment {
160155
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
161-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
162156
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
163157
TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor'
164158
}
@@ -191,17 +185,13 @@ pipeline {
191185
options { timeout(time: 20, unit: 'MINUTES') }
192186
environment {
193187
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
194-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
195188
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
196189
}
197190
steps {
198191
script {
199192
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
200193
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
201194
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
202-
"DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " +
203-
"DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " +
204-
"GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " +
205195
"./mvnw -s settings.xml -Pci,artifactory " +
206196
"-Dartifactory.server=${p['artifactory.url']} " +
207197
"-Dartifactory.username=${ARTIFACTORY_USR} " +

ci/pipeline.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token
3131
artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
3232
artifactory.url=https://repo.spring.io
3333
artifactory.repository.snapshot=libs-snapshot-local
34-
develocity.cache.credentials=gradle_enterprise_cache_user
3534
develocity.access-key=gradle_enterprise_secret_access_key
3635
jenkins.user.name=spring-builds+jenkins

ci/test.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,16 @@
33
set -euo pipefail
44

55
mkdir -p /tmp/jenkins-home/.m2/spring-data-jpa
6-
mkdir -p /tmp/jenkins-home/.m2/.gradle-enterprise
6+
mkdir -p /tmp/jenkins-home/.m2/.develocity
77
chown -R 1001:1001 .
88

9-
export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR}
10-
export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
119
export JENKINS_USER=${JENKINS_USER_NAME}
1210

13-
# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY
14-
export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY}
15-
1611
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
1712
./mvnw -s settings.xml \
1813
-P${PROFILE} clean dependency:list test -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa
1914

2015
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
2116
./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa
2217

23-
chown -R 1001:1001 /tmp/jenkins-home/.m2/.gradle-enterprise
18+
chown -R 1001:1001 /tmp/jenkins-home/.m2/.develocity

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,17 @@
266266
<plugins>
267267
<plugin>
268268
<groupId>com.gradle</groupId>
269-
<artifactId>gradle-enterprise-maven-extension</artifactId>
269+
<artifactId>develocity-maven-extension</artifactId>
270270
<configuration>
271-
<gradleEnterprise>
271+
<develocity>
272272
<normalization>
273273
<runtimeClassPath>
274274
<ignoredFiles>
275275
<ignoredFile>builddef.lst</ignoredFile>
276276
</ignoredFiles>
277277
</runtimeClassPath>
278278
</normalization>
279-
</gradleEnterprise>
279+
</develocity>
280280
</configuration>
281281
</plugin>
282282
</plugins>

0 commit comments

Comments
 (0)