Skip to content

Commit 3fc19bb

Browse files
authored
Migrate build to Spring Develocity Conventions extension.
* Migrate build to Spring Develocity Conventions extension. * Adopt Develocity environment variables. Closes #2944
1 parent 8f86007 commit 3fc19bb

File tree

6 files changed

+4
-57
lines changed

6 files changed

+4
-57
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ node_modules
3232
node
3333
package-lock.json
3434

35-
.mvn/.gradle-enterprise
35+
.mvn/.develocity

.mvn/extensions.xml

+3-8
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.19.2</version>
7-
</extension>
8-
<extension>
9-
<groupId>com.gradle</groupId>
10-
<artifactId>common-custom-user-data-maven-extension</artifactId>
11-
<version>1.12.4</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>

.mvn/gradle-enterprise.xml

-31
This file was deleted.

Jenkinsfile

-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ pipeline {
3333

3434
environment {
3535
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
36-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
3736
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
3837
}
3938

@@ -65,7 +64,6 @@ pipeline {
6564
options { timeout(time: 30, unit: 'MINUTES') }
6665
environment {
6766
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
68-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
6967
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
7068
}
7169
steps {
@@ -96,17 +94,13 @@ pipeline {
9694
options { timeout(time: 20, unit: 'MINUTES') }
9795
environment {
9896
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
99-
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
10097
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
10198
}
10299
steps {
103100
script {
104101
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
105102
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
106103
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
107-
"DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " +
108-
"DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " +
109-
"GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " +
110104
"./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch-non-root " +
111105
"-Dartifactory.server=${p['artifactory.url']} " +
112106
"-Dartifactory.username=${ARTIFACTORY_USR} " +

ci/clean.sh

-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22

33
set -euo pipefail
44

5-
export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR}
6-
export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
75
export JENKINS_USER=${JENKINS_USER_NAME}
86

9-
# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY
10-
export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY}
11-
127
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
138
./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch

ci/verify.sh

-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@ set -euo pipefail
44

55
mkdir -p /tmp/jenkins-home/.m2/spring-data-elasticsearch
66
chown -R 1001:1001 .
7-
8-
export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR}
9-
export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
107
export JENKINS_USER=${JENKINS_USER_NAME}
118

12-
# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY
13-
export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY}
14-
159
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
1610
./mvnw -s settings.xml \
1711
-P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch

0 commit comments

Comments
 (0)