Skip to content

Commit

Permalink
Fix build warning with latest tycho/maven-gpg-plugin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
akurtakov committed Nov 19, 2024
1 parent a58227c commit 4074fc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
'''
Expand Down

0 comments on commit 4074fc1

Please sign in to comment.