From fea59ba5ded4d48d088deff3e88ca5387f439f0f Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Thu, 5 Dec 2024 14:22:09 -0500 Subject: [PATCH] Add "--pinentry-mode loopback" to gpg As per instructions in https://wiki.eclipse.org/Jenkins#How_can_artifacts_be_deployed_to_OSSRH_.2F_Maven_Central.3F --- documentation/releasing.md | 4 ++-- releng/build.Jenkinsfile | 2 +- releng/deploy-build.sh | 9 ++++++--- releng/gpgparameters.pom | 30 ++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 releng/gpgparameters.pom diff --git a/documentation/releasing.md b/documentation/releasing.md index ee0d828ee..46960a588 100644 --- a/documentation/releasing.md +++ b/documentation/releasing.md @@ -12,7 +12,7 @@ Items at the beginning of development - [ ] Check [CHANGELOG.md](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/CHANGELOG.md) is up to date. The changelog should have a version entry, release date, API Breakages and other information consistent with current entries in the changelog. - [ ] Check [README.md](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/README.md) is up to date. In particular that the planned release and which versions of DAP and LSP are support is listed. - [ ] Increment version of all feature.xml, pom.xml and any other place full version is used. (Easiest way is global find and replace, e.g. `s/0.23.0/0.24.0/g`, `s/0.22.0/0.23.0/g` and review changes.) Ensure that `-SNAPSHOT` is restored in the [gradle/versions.gradle](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/gradle/versions.gradle) and [releng/pom.xml](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/pom.xml) -- [ ] Enable `sh './releng/deploy-build.sh'` in [releng/build.Jenkinsfile](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile) +- [ ] Enable `cd releng && ./deploy-build.sh'` in [releng/build.Jenkinsfile](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile) - [ ] Ensure [the CI build](https://ci.eclipse.org/lsp4j/job/lsp4j-multi-build/job/main/) is stable - it is always better to release a "Green Dot" build Items in the days ahead of Release day: @@ -30,7 +30,7 @@ Items on Release day: - [ ] Prepare the repo for release by: - [ ] removing `-SNAPSHOT` from [gradle/versions.gradle](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/gradle/versions.gradle) - [ ] removing `-SNAPSHOT` from [releng/pom.xml](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/pom.xml) entries in `` section. - - [ ] disabling `sh './releng/deploy-build.sh'` in [releng/build.Jenkinsfile](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile) + - [ ] disabling `cd releng && ./deploy-build.sh'` in [releng/build.Jenkinsfile](/~https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile) - see commit /~https://github.com/eclipse-lsp4j/lsp4j/commit/328ce8a4c89b0cd84fb62118f459b6cf79b09e90 for a past example - [ ] Push the above change - [ ] Run [the CI build](https://ci.eclipse.org/lsp4j/job/lsp4j-multi-build/job/main/) diff --git a/releng/build.Jenkinsfile b/releng/build.Jenkinsfile index 2c244d6d6..98683fe84 100644 --- a/releng/build.Jenkinsfile +++ b/releng/build.Jenkinsfile @@ -73,7 +73,7 @@ pipeline { // XXX: Can release vs snapshot be detected automatically so that // the following line does not have to be commented/uncommented // on each change to/from SNAPSHOT? - sh './releng/deploy-build.sh' + sh 'cd releng && ./deploy-build.sh' } } } diff --git a/releng/deploy-build.sh b/releng/deploy-build.sh index 9e86a1972..8a20382c1 100755 --- a/releng/deploy-build.sh +++ b/releng/deploy-build.sh @@ -5,6 +5,9 @@ set -e # error out on any failed commands set -x # echo all commands used for debugging purposes +# This script is expected to be run with CWD of ./releng so that when maven runs below +# with the -f flag the CWD of Maven is the same as the rest of ths script. + SSHUSER="genie.lsp4j@projects-storage.eclipse.org" SSH="ssh ${SSHUSER}" SCP="scp" @@ -21,7 +24,7 @@ if $SSH test -e ${DOWNLOAD_MOUNT}-last; then $SSH rm -r ${DOWNLOAD_MOUNT}-last fi $SSH mkdir -p ${DOWNLOAD_MOUNT}-new -$SCP -rp build/p2-repository/* "${SSHUSER}:"${DOWNLOAD_MOUNT}-new +$SCP -rp ../build/p2-repository/* "${SSHUSER}:"${DOWNLOAD_MOUNT}-new if $SSH test -e ${DOWNLOAD_MOUNT}; then $SSH mv ${DOWNLOAD_MOUNT} ${DOWNLOAD_MOUNT}-last fi @@ -31,12 +34,12 @@ $SSH mv ${DOWNLOAD_MOUNT}-new ${DOWNLOAD_MOUNT} case $BRANCH_NAME in main | release_*) # GPG Sign and Deploy to Maven Central snapshot - find build/maven-repository -name '*.pom' | while read i + find ../build/maven-repository -name '*.pom' | while read i do base="${i%.*}" # See https://wiki.eclipse.org/Jenkins#How_can_artifacts_be_deployed_to_OSSRH_.2F_Maven_Central.3F for more info # on the Eclipse Foundation specific settings. - mvn -X \ + mvn -X -f gpgparameters.pom \ org.apache.maven.plugins:maven-gpg-plugin:3.2.7:sign-and-deploy-file \ -DpomFile=${base}.pom \ -Dfile=${base}.jar \ diff --git a/releng/gpgparameters.pom b/releng/gpgparameters.pom new file mode 100644 index 000000000..af7fa4b2a --- /dev/null +++ b/releng/gpgparameters.pom @@ -0,0 +1,30 @@ + +4.0.0 + + org.eclipse.lsp4j + gpgparameters + 0.24.0-SNAPSHOT + pom + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + --pinentry-mode + loopback + + + + + +