From 6892958acccd6ff4ee37fa3da6e1bda9a902c1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Mon, 26 Aug 2024 16:44:23 +0300 Subject: [PATCH] Fix gpg signing --- Jenkinsfile | 13 ++----------- pom.xml | 5 +++-- releng/org.eclipse.linuxtools.docker-site/pom.xml | 12 ------------ 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index acf80bd872..2457258e7a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,21 +55,12 @@ spec: MAVEN_OPTS = "-Xmx2G" } stages { - stage('Initialize PGP') { - steps { - container('container') { - withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) { - sh 'gpg --batch --import "${KEYRING}"' - sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done' - }} - } - } stage('Build') { steps { container('container') { - withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) { + withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING'),string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE') ]) { wrap([$class: 'Xvnc', useXauthority: true]) { - sh """mvn clean verify -e ${env.BRANCH_NAME=='master' ? '-Psign': ''} -Dmaven.test.failure.ignore=true -ntp -Ddash.fail=true -Dgpg.passphrase="${KEYRING_PASSPHRASE}" """ + sh '''mvn -e -Psign -Dmaven.test.failure.ignore=true -ntp -Ddash.fail=true -Dgpg.passphrase="${KEYRING_PASSPHRASE}" -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" clean verify''' } }} } diff --git a/pom.xml b/pom.xml index 7b91ed71d3..87be7a8477 100644 --- a/pom.xml +++ b/pom.xml @@ -269,8 +269,9 @@ sign-p2-artifacts - F5CBCFD82F07D82E - false + bc + 2F07D82E + true diff --git a/releng/org.eclipse.linuxtools.docker-site/pom.xml b/releng/org.eclipse.linuxtools.docker-site/pom.xml index fa5bdcd9f1..f7c9d5ac83 100644 --- a/releng/org.eclipse.linuxtools.docker-site/pom.xml +++ b/releng/org.eclipse.linuxtools.docker-site/pom.xml @@ -63,18 +63,6 @@ org.eclipse.tycho tycho-gpg-plugin - - - pgpsigner - - sign-p2-artifacts - - - F5CBCFD82F07D82E - false - - -