From 6a074b4f5332d370493ede6966533c5222640d2a Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Fri, 26 Jul 2024 14:50:52 -0500 Subject: [PATCH 1/2] Migrate build to Spring Develocity Conventions extension. --- .gitignore | 2 +- .mvn/extensions.xml | 11 +++-------- .mvn/gradle-enterprise.xml | 31 ------------------------------- 3 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 .mvn/gradle-enterprise.xml diff --git a/.gitignore b/.gitignore index ef40aef30..a3aca8d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ node_modules package-lock.json package.json node -.mvn/.gradle-enterprise +.mvn/.develocity diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index ebd761025..1e3bb355f 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -1,13 +1,8 @@ - com.gradle - gradle-enterprise-maven-extension - 1.19.2 - - - com.gradle - common-custom-user-data-maven-extension - 1.12.4 + io.spring.develocity.conventions + develocity-conventions-maven-extension + 0.0.19 diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml deleted file mode 100644 index f5ad51339..000000000 --- a/.mvn/gradle-enterprise.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - https://ge.spring.io - - - #{isFalse(env['CI'])} - true - true - - #{{'0.0.0.0'}} - - - - - true - - - - - ${env.DEVELOCITY_CACHE_USERNAME} - ${env.DEVELOCITY_CACHE_PASSWORD} - - - true - #{env['DEVELOCITY_CACHE_USERNAME'] != null and env['DEVELOCITY_CACHE_PASSWORD'] != null} - - - From 75e866e8634efd00f8cddac3fd8dae7fa68dd7c7 Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Fri, 26 Jul 2024 14:52:23 -0500 Subject: [PATCH 2/2] Adopt Develocity environment variables. --- Jenkinsfile | 12 ------------ ci/pipeline.properties | 1 - 2 files changed, 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 477738ee4..b737e5d9f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES') } environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") } steps { @@ -46,9 +45,6 @@ pipeline { sh 'mongo --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"' sh 'sleep 15' sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - 'DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} ' + - 'DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} ' + - 'GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} ' + './mvnw -s settings.xml clean dependency:list test -Dsort -U -B -Pit' } } @@ -72,7 +68,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES') } environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") } steps { @@ -85,9 +80,6 @@ pipeline { sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"' sh 'sleep 15' sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - 'DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} ' + - 'DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} ' + - 'GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} ' + './mvnw -s settings.xml clean dependency:list test -Dsort -U -B -Pit' } } @@ -112,7 +104,6 @@ pipeline { environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") } @@ -121,9 +112,6 @@ pipeline { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " + - "DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " + - "GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " + "./mvnw -s settings.xml -Pci,artifactory " + "-Dartifactory.server=${p['artifactory.url']} " + "-Dartifactory.username=${ARTIFACTORY_USR} " + diff --git a/ci/pipeline.properties b/ci/pipeline.properties index 824563a21..dea835720 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -31,6 +31,5 @@ docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c artifactory.url=https://repo.spring.io artifactory.repository.snapshot=libs-snapshot-local -develocity.cache.credentials=gradle_enterprise_cache_user develocity.access-key=gradle_enterprise_secret_access_key jenkins.user.name=spring-builds+jenkins