From 7f649c4b66ac266ea4564f9215da67ae9f582336 Mon Sep 17 00:00:00 2001 From: "Greg L. Turnquist" Date: Thu, 19 Oct 2023 10:53:14 -0500 Subject: [PATCH] Migrate from Gradle Enterprise to Develocity. Gradle Enterprise has been rebranded as Develocity. See #1645 --- .mvn/gradle-enterprise.xml | 8 ++++---- Jenkinsfile | 20 ++++++++++---------- ci/clean.sh | 6 ++++++ ci/run-tests-against-all-dbs.sh | 6 ++++++ ci/test.sh | 7 +++++++ 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml index bbe439e12b..c244063147 100644 --- a/.mvn/gradle-enterprise.xml +++ b/.mvn/gradle-enterprise.xml @@ -6,7 +6,7 @@ https://ge.spring.io - #{isFalse(env['CI'])} + false true true @@ -20,12 +20,12 @@ - ${env.GRADLE_ENTERPRISE_CACHE_USERNAME} - ${env.GRADLE_ENTERPRISE_CACHE_PASSWORD} + ${env.DEVELOCITY_CACHE_USERNAME} + ${env.DEVELOCITY_CACHE_PASSWORD} true - #{env['GRADLE_ENTERPRISE_CACHE_USERNAME'] != null and env['GRADLE_ENTERPRISE_CACHE_PASSWORD'] != null} + #{env['DEVELOCITY_CACHE_USERNAME'] != null and env['DEVELOCITY_CACHE_PASSWORD'] != null} diff --git a/Jenkinsfile b/Jenkinsfile index cc8529aaf4..b84fe8888c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,8 +33,8 @@ pipeline { environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}") - GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}") + DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") + DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.ProxyImageNameSubstitutor' } @@ -64,8 +64,8 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES') } environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}") - GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}") + DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") + DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.ProxyImageNameSubstitutor' } steps { @@ -95,18 +95,18 @@ pipeline { environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}") - GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}") + DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") + DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") } steps { script { docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { sh 'MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" ' + - 'GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR} ' + - 'GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW} ' + - 'GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY} ' + - './mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-relational-non-root ' + + '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 -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-relational-non-root ' + '-Dartifactory.server=https://repo.spring.io ' + "-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " + diff --git a/ci/clean.sh b/ci/clean.sh index 017cbdba0f..e6359a2623 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -2,5 +2,11 @@ set -euo pipefail +export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} +export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} + +# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY +export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} + MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" \ ./mvnw -s settings.xml clean -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc diff --git a/ci/run-tests-against-all-dbs.sh b/ci/run-tests-against-all-dbs.sh index dd15c946fd..5024227386 100755 --- a/ci/run-tests-against-all-dbs.sh +++ b/ci/run-tests-against-all-dbs.sh @@ -1,3 +1,9 @@ #!/bin/sh +export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} +export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} + +# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY +export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} + ./mvnw -s settings.xml clean install -Pall-dbs diff --git a/ci/test.sh b/ci/test.sh index b8c9561a26..56b65921bb 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -10,6 +10,13 @@ cp spring-data-relational/src/test/java/org/springframework/data/ProxyImageNameS mkdir -p /tmp/jenkins-home chown -R 1001:1001 . + +export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} +export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} + +# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY +export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} + MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" \ ./mvnw -s settings.xml \ -P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc