diff --git a/.gitignore b/.gitignore index 235706c9..65d226e3 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,6 @@ _site credentials.yml # Things to ignore that facilitate backports. -spring-ws-bom \ No newline at end of file +spring-ws-bom +.flattened-pom.xml +.mvn/.gradle-enterprise diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 00000000..85a16c3a --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,13 @@ + + + + com.gradle + gradle-enterprise-maven-extension + 1.18.1 + + + com.gradle + common-custom-user-data-maven-extension + 1.12.2 + + \ No newline at end of file diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml new file mode 100644 index 00000000..135c1183 --- /dev/null +++ b/.mvn/gradle-enterprise.xml @@ -0,0 +1,31 @@ + + + + https://ge.spring.io + + + false + true + true + + #{{'0.0.0.0'}} + + + + + true + + + + + spring-builds+jenkins + ${env.GRADLE_ENTERPRISE_CACHE_PASSWORD} + + + true + #{env['GRADLE_ENTERPRISE_CACHE_USERNAME'] != null and env['GRADLE_ENTERPRISE_CACHE_PASSWORD'] != null} + + + \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 08818eaa..51acb0d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,6 +22,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']}") } steps { script { @@ -35,7 +37,7 @@ pipeline { stage("Test other configurations") { when { beforeAgent(true) - branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP") + branch(pattern: "main|(\\d\\.\\d\\.x)|issue/.+", comparator: "REGEXP") } parallel { @@ -44,6 +46,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']}") } steps { script { @@ -59,6 +63,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']}") } steps { script { @@ -73,6 +79,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']}") } steps { script { @@ -87,6 +95,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']}") } steps { script { @@ -101,6 +111,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']}") } steps { script { @@ -115,6 +127,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']}") } steps { script { @@ -129,6 +143,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']}") } steps { script { @@ -150,6 +166,8 @@ pipeline { KEYRING = credentials('spring-signing-secring.gpg') PASSPHRASE = credentials('spring-gpg-passphrase') STAGING_PROFILE_ID = credentials('spring-data-release-deployment-maven-central-staging-profile-id') + GRADLE_ENTERPRISE_CACHE = credentials("${p['gradle-enterprise-cache.credentials']}") + GRADLE_ENTERPRISE_ACCESS_KEY = credentials("${p['gradle-enterprise.access-key']}") } steps { @@ -182,7 +200,7 @@ pipeline { sh "ci/build-and-deploy-to-maven-central.sh ${PROJECT_VERSION} ${STAGING_REPOSITORY_ID}" sh "ci/rc-close.sh ${STAGING_REPOSITORY_ID}" - sh "ci/smoke-test-against-maven-central.sh ${PROJECT_VERSION} ${STAGING_REPOSITORY_ID}" +// sh "ci/smoke-test-against-maven-central.sh ${PROJECT_VERSION} ${STAGING_REPOSITORY_ID}" sh "ci/rc-release.sh ${STAGING_REPOSITORY_ID}" slackSend( @@ -210,22 +228,25 @@ pipeline { stage('Release documentation') { when { - anyOf { - branch '3.1.x' - branch 'release-3.1.x' - } + beforeAgent(true) + branch(pattern: "(release-)?(\\d\\.\\d\\.x)", comparator: "REGEXP") } agent any options { timeout(time: 20, 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']}") } steps { script { docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pjakarta-ee-10,distribute,docs ' + + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ' + + 'GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR} ' + + 'GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW} ' + + './mvnw -s settings.xml -Pdistribute,docs ' + '-Dartifactory.server=https://repo.spring.io ' + "-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " + diff --git a/ci/build-and-deploy-to-artifactory.sh b/ci/build-and-deploy-to-artifactory.sh index ae919d17..ac132cd3 100755 --- a/ci/build-and-deploy-to-artifactory.sh +++ b/ci/build-and-deploy-to-artifactory.sh @@ -4,6 +4,9 @@ set -euo pipefail RELEASE_TYPE=$1 +export GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR} +export GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW} + echo 'Deploying to Artifactory...' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw \ diff --git a/ci/build-and-deploy-to-maven-central.sh b/ci/build-and-deploy-to-maven-central.sh index 87793df8..2826f84c 100755 --- a/ci/build-and-deploy-to-maven-central.sh +++ b/ci/build-and-deploy-to-maven-central.sh @@ -5,6 +5,9 @@ set -euo pipefail PROJECT_VERSION=$1 STAGING_REPOSITORY_ID=$2 +export GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR} +export GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW} + echo 'Staging on Maven Central...' GNUPGHOME=/tmp/gpghome diff --git a/ci/pipeline.properties b/ci/pipeline.properties index 8063fe97..98a79390 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -13,3 +13,5 @@ docker.java.inside.basic=-v $HOME:/tmp/jenkins-home # Credentials artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c +gradle-enterprise-cache.credentials=gradle_enterprise_cache_user +gradle-enterprise.access-key=gradle_enterprise_secret_access_key diff --git a/ci/test.sh b/ci/test.sh index 2df06827..0958b206 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -2,9 +2,9 @@ set -euo pipefail -mkdir -p /tmp/jenkins-home/.m2/spring-ws -chown -R 1001:1001 . +export GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USR} +export GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PSW} MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" \ ./mvnw -s settings.xml \ - -P${PROFILE} clean dependency:list test -Dsort -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-ws + -P${PROFILE} clean dependency:list test -Dsort -B diff --git a/pom.xml b/pom.xml index e2139360..1805480e 100644 --- a/pom.xml +++ b/pom.xml @@ -231,6 +231,26 @@ + + + + + com.gradle + gradle-enterprise-maven-extension + + + + + + builddef.lst + + + + + + + + @@ -848,15 +868,14 @@ true + + false + spring-milestone https://repo.spring.io/milestone - - spring-release - https://repo.spring.io/release - @@ -866,6 +885,9 @@ true + + false + spring-milestone