diff --git a/Jenkinsfile b/Jenkinsfile index fd8ebc8..990ab3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,9 @@ def repo = 'git@github.com:Internet2/grouper.git' -def gpg_key = '1D3F3E9E30C7F312' def jdk_id = 'Corretto-JDK8' def maven_id = 'Maven-3.8.4' +def gpg_cred_id = 'grouper-gpg-key' +def sonatype_cred_id = 'grouper-sonatype-login' +def gpg_key = '1D3F3E9E30C7F312' def git_tag = env.TAG_NAME ?: env.BRANCH_NAME def tag_pattern = /^(\d+\.\d+\.\w+)$/ @@ -12,7 +14,7 @@ node('docker') { if (git_tag ==~ tag_pattern ) { stage("PgpImport") { - withCredentials([file(credentialsId: 'grouper-sonatype-login', variable: 'GPG_KEYS')]) { + withCredentials([file(credentialsId: gpg_cred_id, variable: 'GPG_KEYS')]) { sh 'gpg --keyring=pubring.gpg --no-default-keyring --import $GPG_KEYS' } } @@ -56,7 +58,7 @@ node('docker') { } stage('Release') { - withCredentials([usernamePassword(credentialsId: 'grouper-sonatype-login', usernameVariable: 'SONATYPE_USER', passwordVariable: 'SONATYPE_PWD')]) { + withCredentials([usernamePassword(credentialsId: sonatype_cred_id, usernameVariable: 'SONATYPE_USER', passwordVariable: 'SONATYPE_PWD')]) { withMaven( maven: maven_id, mavenSettingsFilePath: "travis/mvn.settings.xml",