From 9a9448220cf38d127e1b5dd2eb0b62f70e3e409f 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: Tue, 19 Nov 2024 13:31:14 +0200 Subject: [PATCH] Fix build warning with latest tycho/maven-gpg-plugin Removes ``` [WARNING] Parameter 'passphrase' (user property 'gpg.passphrase') is deprecated: Do not use this configuration, it may leak sensitive information. Rely on gpg-agent or env variables instead. [WARNING] [WARNING] W A R N I N G [WARNING] [WARNING] Do not store passphrase in any file (disk or SCM repository), [WARNING] instead rely on GnuPG agent or provide passphrase in [WARNING] MAVEN_GPG_PASSPHRASE environment variable for batch mode. [WARNING] [WARNING] Sensitive content loaded from Mojo configuration ``` from the build output. --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3428f1036..0ecfbfff5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,17 +22,17 @@ pipeline { steps { withCredentials([ file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING'), - string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE') + string(credentialsId: 'gpg-passphrase', variable: 'MAVEN_GPG_PASSPHRASE') ]) { xvnc(useXauthority: true) { sh '''#!/bin/bash -x mavenArgs="clean verify --batch-mode -Dmaven.test.failure.ignore=true -Dtycho.p2.baselineMode=failCommon" if [[ ${BRANCH_NAME} == master ]] || [[ ${BRANCH_NAME} =~ m2e-[0-9]+\\.[0-9]+\\.x ]]; then - mvn ${mavenArgs} -Peclipse-sign,its -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" -Dgpg.passphrase="${KEYRING_PASSPHRASE}" + mvn ${mavenArgs} -Peclipse-sign,its -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" else # Clear signing environment variables for PRs export KEYRING='EMPTY' - export KEYRING_PASSPHRASE='EMPTY' + export MAVEN_GPG_PASSPHRASE='EMPTY' mvn ${mavenArgs} -Pits fi '''