Skip to content

Commit 27b07a5

Browse files
authored
Migrate build to Develocity Conventions Maven extension. (#1426)
1 parent 5f5b1a5 commit 27b07a5

9 files changed

+13
-75
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ _site
2424

2525
credentials.yml
2626
.flattened-pom.xml
27-
.mvn/.gradle-enterprise
2827
.mvn/.develocity

.mvn/develocity.xml

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

.mvn/extensions.xml

Lines changed: 3 additions & 8 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>develocity-maven-extension</artifactId>
6-
<version>1.21.3</version>
7-
</extension>
8-
<extension>
9-
<groupId>com.gradle</groupId>
10-
<artifactId>common-custom-user-data-maven-extension</artifactId>
11-
<version>2.0</version>
4+
<groupId>io.spring.develocity.conventions</groupId>
5+
<artifactId>develocity-conventions-maven-extension</artifactId>
6+
<version>0.0.19</version>
127
</extension>
138
</extensions>

Jenkinsfile

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ pipeline {
3737
options { timeout(time: 30, unit: 'MINUTES')}
3838
environment {
3939
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
40-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
41-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
40+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
4241
}
4342
steps {
4443
script {
@@ -63,8 +62,7 @@ pipeline {
6362
options { timeout(time: 30, unit: 'MINUTES')}
6463
environment {
6564
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
66-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
67-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
65+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
6866
}
6967
steps {
7068
script {
@@ -82,8 +80,7 @@ pipeline {
8280
options { timeout(time: 30, unit: 'MINUTES')}
8381
environment {
8482
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
85-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
86-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
83+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
8784
}
8885
steps {
8986
script {
@@ -101,8 +98,7 @@ pipeline {
10198
options { timeout(time: 30, unit: 'MINUTES')}
10299
environment {
103100
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
104-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
105-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
101+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
106102
}
107103
steps {
108104
script {
@@ -120,8 +116,7 @@ pipeline {
120116
options { timeout(time: 30, unit: 'MINUTES')}
121117
environment {
122118
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
123-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
124-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
119+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
125120
}
126121
steps {
127122
script {
@@ -137,8 +132,7 @@ pipeline {
137132
options { timeout(time: 30, unit: 'MINUTES')}
138133
environment {
139134
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
140-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
141-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
135+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
142136
}
143137
steps {
144138
script {
@@ -161,8 +155,7 @@ pipeline {
161155
KEYRING = credentials('spring-signing-secring.gpg')
162156
PASSPHRASE = credentials('spring-gpg-passphrase')
163157
STAGING_PROFILE_ID = credentials('spring-data-release-deployment-maven-central-staging-profile-id')
164-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
165-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
158+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
166159
}
167160

168161
steps {
@@ -234,8 +227,7 @@ pipeline {
234227
KEYRING = credentials('spring-signing-secring.gpg')
235228
PASSPHRASE = credentials('spring-gpg-passphrase')
236229
STAGING_PROFILE_ID = credentials('spring-data-release-deployment-maven-central-staging-profile-id')
237-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
238-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
230+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
239231
}
240232

241233
steps {
@@ -294,17 +286,14 @@ pipeline {
294286

295287
environment {
296288
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
297-
GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}")
298-
GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}")
289+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
299290
}
300291

301292
steps {
302293
script {
303294
docker.withRegistry('', "${p['dockerhub.credentials']}") {
304295
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
305296
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ' +
306-
'GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR} ' +
307-
'GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW} ' +
308297
'./mvnw -s settings.xml -Pjakarta-ee-10,distribute,docs ' +
309298
'-Dartifactory.server=https://repo.spring.io ' +
310299
"-Dartifactory.username=${ARTIFACTORY_USR} " +

ci/build-and-deploy-to-artifactory.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ set -euo pipefail
44

55
RELEASE_TYPE=$1
66

7-
export GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR}
8-
export GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW}
9-
107
echo 'Deploying to Artifactory...'
118

129
MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" ./mvnw \

ci/build-and-deploy-to-maven-central.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ set -euo pipefail
55
PROJECT_VERSION=$1
66
STAGING_REPOSITORY_ID=$2
77

8-
export GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR}
9-
export GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW}
10-
118
echo 'Staging on Maven Central...'
129

1310
GNUPGHOME=/tmp/gpghome

ci/pipeline.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ docker.java.inside.basic=-v $HOME:/tmp/jenkins-home
1818
# Credentials
1919
artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
2020
dockerhub.credentials=hub.docker.com-springbuildmaster
21-
gradle-enterprise-cache.credentials=gradle_enterprise_cache_user
22-
gradle-enterprise.access-key=gradle_enterprise_secret_access_key
21+
develocity.access-key=gradle_enterprise_secret_access_key

ci/test.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
set -euo pipefail
44

5-
export GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR}
6-
export GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW}
7-
85
MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" \
96
./mvnw -s settings.xml \
107
-P${PROFILE} clean dependency:list test -Dsort -B -U

settings.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
<username>${env.ARTIFACTORY_USR}</username>
2525
<password>${env.ARTIFACTORY_PSW}</password>
2626
</server>
27-
<server>
28-
<id>ge.spring.io</id>
29-
<username>${env.GRADLE_ENTERPRISE_CACHE_USERNAME}</username>
30-
<password>${env.GRADLE_ENTERPRISE_CACHE_PASSWORD}</password>
31-
</server>
3227
</servers>
3328

3429
</settings>

0 commit comments

Comments
 (0)