From 20ca7d57d10dca7a62246ce4342dcfa31fbfda70 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Fri, 15 Jul 2022 13:09:18 -0700 Subject: [PATCH] Add jenkins prefix to creds to sonatype Signed-off-by: Sayali Gaikawad --- jenkins/opensearch-maven-release/maven-sign-release.jenkinsfile | 2 +- jenkins/opensearch/distribution-build.jenkinsfile | 2 +- .../maven-sign-release/maven-sign-release.jenkinsfile.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins/opensearch-maven-release/maven-sign-release.jenkinsfile b/jenkins/opensearch-maven-release/maven-sign-release.jenkinsfile index bd2b0210f0..c592b3b9bc 100644 --- a/jenkins/opensearch-maven-release/maven-sign-release.jenkinsfile +++ b/jenkins/opensearch-maven-release/maven-sign-release.jenkinsfile @@ -56,7 +56,7 @@ pipeline { steps { script { // stage artifacts for release with Sonatype - withCredentials([usernamePassword(credentialsId: 'Sonatype', usernameVariable: 'SONATYPE_USERNAME', passwordVariable: 'SONATYPE_PASSWORD')]) { + withCredentials([usernamePassword(credentialsId: 'jenkins-sonatype-creds', usernameVariable: 'SONATYPE_USERNAME', passwordVariable: 'SONATYPE_PASSWORD')]) { sh('$WORKSPACE/publish/stage-maven-release.sh $WORKSPACE/artifacts/$ARTIFACT_PATH/opensearch/maven') } } diff --git a/jenkins/opensearch/distribution-build.jenkinsfile b/jenkins/opensearch/distribution-build.jenkinsfile index 7d98f55c3f..97d80a31b1 100644 --- a/jenkins/opensearch/distribution-build.jenkinsfile +++ b/jenkins/opensearch/distribution-build.jenkinsfile @@ -91,7 +91,7 @@ pipeline { String mavenPath = "$WORKSPACE/tar/builds/opensearch/maven" if (fileExists(mavenPath)) { - withCredentials([usernamePassword(credentialsId: 'Sonatype', usernameVariable: 'SONATYPE_USERNAME', passwordVariable: 'SONATYPE_PASSWORD')]) { + withCredentials([usernamePassword(credentialsId: 'jenkins-sonatype-creds', usernameVariable: 'SONATYPE_USERNAME', passwordVariable: 'SONATYPE_PASSWORD')]) { sh("$WORKSPACE/publish/publish-snapshot.sh ${mavenPath}") } } else { diff --git a/tests/jenkins/jenkinsjob-regression-files/maven-sign-release/maven-sign-release.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/maven-sign-release/maven-sign-release.jenkinsfile.txt index 69317dea4e..85c7fa91ee 100644 --- a/tests/jenkins/jenkinsjob-regression-files/maven-sign-release/maven-sign-release.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/maven-sign-release/maven-sign-release.jenkinsfile.txt @@ -36,7 +36,7 @@ ) maven-sign-release.stage(stage maven artifacts, groovy.lang.Closure) maven-sign-release.script(groovy.lang.Closure) - maven-sign-release.usernamePassword({credentialsId=Sonatype, usernameVariable=SONATYPE_USERNAME, passwordVariable=SONATYPE_PASSWORD}) + maven-sign-release.usernamePassword({credentialsId=jenkins-sonatype-creds, usernameVariable=SONATYPE_USERNAME, passwordVariable=SONATYPE_PASSWORD}) maven-sign-release.withCredentials([[SONATYPE_USERNAME, SONATYPE_PASSWORD]], groovy.lang.Closure) maven-sign-release.sh($WORKSPACE/publish/stage-maven-release.sh $WORKSPACE/artifacts/$ARTIFACT_PATH/opensearch/maven) maven-sign-release.script(groovy.lang.Closure)