From e21aebdd7c20553724a2289d1bcca308d7aa228d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 18 Nov 2022 10:03:18 +0100 Subject: [PATCH] Fix Maven configuration properties. --- Jenkinsfile | 6 +++++- ci/prepare-and-build.bash | 7 +++---- ci/release.properties | 2 +- .../resources/application-jenkins.properties | 19 +++++++++---------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7298b2b..0de4276 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,6 +15,10 @@ pipeline { stages { stage('Build the Spring Data release tools container') { + when { + changeset 'ci/Dockerfile' + } + agent { label 'data' } @@ -45,7 +49,7 @@ pipeline { GITHUB_TOKEN = credentials('7b3ebbea-7001-479b-8578-b8c464dab973') DEPLOYMENT_API_KEY = credentials('repo_spring_io-jenkins-release-token') STAGING_PROFILE_ID = credentials('spring-data-release-deployment-maven-central-staging-profile-id') - MAVEN_SIGNING_KEYRING = credentials('spring-signing-secring.gpg') + MAVEN_SIGNING_KEY = credentials('spring-gpg-private-key') MAVEN_SIGNING_KEY_PASSWORD = credentials('spring-gpg-passphrase') GIT_SIGNING_KEY = credentials('spring-gpg-github-private-key-jenkins') GIT_SIGNING_KEY_PASSWORD = credentials('spring-gpg-github-passphrase-jenkins') diff --git a/ci/prepare-and-build.bash b/ci/prepare-and-build.bash index 8144396..865297a 100755 --- a/ci/prepare-and-build.bash +++ b/ci/prepare-and-build.bash @@ -36,12 +36,11 @@ if test -f application-local.properties; then else echo "You are running inside Jenkins! Using parameters fed from the agent." - cp ${MAVEN_SIGNING_KEYRING} ${GNUPGHOME} - + mkdir -p ~/.gnupg + echo "${GIT_SIGNING_KEY_PASSWORD}" | /usr/bin/gpg --batch --yes --passphrase-fd 0 --import "${GIT_SIGNING_KEY}" + echo "${MAVEN_SIGNING_KEY_PASSWORD}" | /usr/bin/gpg --batch --yes --passphrase-fd 0 --import "${MAVEN_SIGNING_KEY}" ls -ld ~/.gnupg ls -lR ~/.gnupg - - echo "${GIT_SIGNING_KEY_PASSWORD}" | /usr/bin/gpg --batch --yes --passphrase-fd 0 --import "${GIT_SIGNING_KEY}" /usr/bin/gpg -k function spring-data-release-shell { diff --git a/ci/release.properties b/ci/release.properties index 94d3e90..816c3d6 100644 --- a/ci/release.properties +++ b/ci/release.properties @@ -1,2 +1,2 @@ # Release train version -release.version=2021.1.10 +release.version=2021.2.7 diff --git a/src/main/resources/application-jenkins.properties b/src/main/resources/application-jenkins.properties index 8c2545b..c276d25 100644 --- a/src/main/resources/application-jenkins.properties +++ b/src/main/resources/application-jenkins.properties @@ -3,27 +3,26 @@ git.author=Spring Builds git.email=builds@springframework.org git.password=${GITHUB_TOKEN} -git.gpg.keyname=6743E1BD +git.gpg.keyname=B3B6F3E392A8615C65A98FC51F33293B709FA3E2 git.gpg.passphrase=${GIT_SIGNING_KEY_PASSWORD} -git.gpg.secretKeyring=${GNUPGHOME}/secring.gpg git.gpg.executable=/usr/bin/gpg deployment.username=${DEPLOYMENT_API_KEY_USR} deployment.password=${DEPLOYMENT_API_KEY_PSW} deployment.api-key=${DEPLOYMENT_API_KEY_PSW} -deployment.maven-central.stagingProfileId=${STAGING_PROFILE_ID} deployment.settings-xml=${SETTINGS_XML} +deployment.maven-central.stagingProfileId=${STAGING_PROFILE_ID} + +deployment.maven-central.gpg.keyname=E2ACB037933CDEAAB7BF77D49A2C7A98E457C53D +deployment.maven-central.gpg.passphrase=${MAVEN_SIGNING_KEY_PASSWORD} +deployment.maven-central.gpg.executable=/usr/bin/gpg + sagan.key=n/a -maven.home=${MAVEN_HOME} +maven.maven-home=${MAVEN_HOME} maven.console-logger=false -maven.repo.local=${RELEASE_TOOLS_CACHE} - -maven.maven-central.gpg.keyname=9A2C7A98E457C53D -maven.maven-central.gpg.passphrase=${MAVEN_SIGNING_KEY_PASSWORD} -maven.maven-central.gpg.secretKeyring=${GNUPGHOME}/secring.gpg -maven.maven-central.gpg.executable=/usr/bin/gpg +maven.local-repository=${RELEASE_TOOLS_CACHE} io.workDir=dist io.logs=${LOGS_DIR}