From 20160c97334bc0da1fcc6d8ffd61fd87543d060d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Ho=C3=9F?= Date: Sat, 18 Feb 2017 22:51:51 +0100 Subject: [PATCH] echo key location MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Hoß --- build/jenkins/Release | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/jenkins/Release b/build/jenkins/Release index 1f2a817..a5e0be9 100644 --- a/build/jenkins/Release +++ b/build/jenkins/Release @@ -1,6 +1,9 @@ node { stage('Checkout') { checkout scm + withCredentials([[$class: 'StringBinding', credentialsId: 'pgp.secretkey', variable: 'PGP_KEY']]) { + sh "echo $PGP_KEY" + } } stage('Versioning') { @@ -13,21 +16,20 @@ node { sh "mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${timestamp}" } catch (exception) { currentBuild.result = 'FAILURE' - throw exception } } } stage('Build & Deploy') { withCredentials([ - string(credentialsId: 'pgp.secretkey', variable: 'pgp_key'), - string(credentialsId: 'pgp.passphrase', variable: 'pgp_passphrase')]) { + string(credentialsId: 'pgp.secretkey', variable: 'PGP_KEY'), + string(credentialsId: 'pgp.passphrase', variable: 'PGP_PASSPHRASE')]) { withMaven( maven: 'maven-latest', mavenSettingsConfig: 'repository.metio.wtf', mavenLocalRepo: '.repository') { try { - sh "mvn clean pgp:sign deploy scm:tag -Drelease=sonatype -DpushChanges=false -Dpgp.secretKey=$pgp_key -Dpgp.passphrase=$pgp_passphrase" + sh("mvn clean pgp:sign deploy scm:tag -Drelease=sonatype -DpushChanges=false -Dpgp.secretKey=${PGP_KEY} -Dpgp.passphrase='${PGP_PASSPHRASE}'") } catch (exception) { currentBuild.result = 'FAILURE' } -- 2.11.4.GIT