Skip to content

Commit 4074fc1

Browse files
committed
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.
1 parent a58227c commit 4074fc1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ pipeline {
2222
steps {
2323
withCredentials([
2424
file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING'),
25-
string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')
25+
string(credentialsId: 'gpg-passphrase', variable: 'MAVEN_GPG_PASSPHRASE')
2626
]) {
2727
xvnc(useXauthority: true) {
2828
sh '''#!/bin/bash -x
2929
mavenArgs="clean verify --batch-mode -Dmaven.test.failure.ignore=true -Dtycho.p2.baselineMode=failCommon"
3030
if [[ ${BRANCH_NAME} == master ]] || [[ ${BRANCH_NAME} =~ m2e-[0-9]+\\.[0-9]+\\.x ]]; then
31-
mvn ${mavenArgs} -Peclipse-sign,its -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" -Dgpg.passphrase="${KEYRING_PASSPHRASE}"
31+
mvn ${mavenArgs} -Peclipse-sign,its -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}"
3232
else
3333
# Clear signing environment variables for PRs
3434
export KEYRING='EMPTY'
35-
export KEYRING_PASSPHRASE='EMPTY'
35+
export MAVEN_GPG_PASSPHRASE='EMPTY'
3636
mvn ${mavenArgs} -Pits
3737
fi
3838
'''

0 commit comments

Comments
 (0)