Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Commit 433cf2e

Browse files
committed
Add Credentials to Docs Deploy
1 parent 98d93a4 commit 433cf2e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Jenkinsfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,11 @@ try {
106106
stage('Deploy Docs') {
107107
node {
108108
checkout scm
109-
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
110-
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
111-
sh "./gradlew deployDocs -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
109+
withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
110+
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
111+
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
112+
sh "./gradlew deployDocs -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
113+
}
112114
}
113115
}
114116
}

0 commit comments

Comments
 (0)