Provide artifactoryUsername/Password in docs and schema jobs

This commit is contained in:
Eleftheria Stein 2021-01-22 14:33:02 +01:00
parent 1181740f79
commit 57dfbeecbb

6
Jenkinsfile vendored
View File

@ -174,8 +174,10 @@ try {
checkout scm checkout scm
sh "git clean -dfx" sh "git clean -dfx"
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) { withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
withCredentials([ARTIFACTORY_CREDENTIALS]) {
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) { withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
sh "./gradlew deployDocs -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace" sh "./gradlew deployDocs -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --refresh-dependencies --no-daemon --stacktrace"
}
} }
} }
} }
@ -187,6 +189,7 @@ try {
checkout scm checkout scm
sh "git clean -dfx" sh "git clean -dfx"
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) { withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
withCredentials([ARTIFACTORY_CREDENTIALS]) {
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) { withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
sh "./gradlew deploySchema -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace" sh "./gradlew deploySchema -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
} }
@ -195,6 +198,7 @@ try {
} }
} }
} }
}
} catch(Exception e) { } catch(Exception e) {
currentBuild.result = 'FAILED: deploys' currentBuild.result = 'FAILED: deploys'
throw e throw e