Serialize the deployment of artifacts & docs.

This commit is contained in:
John Blum
2021-04-07 21:04:21 -07:00
parent db6d6ec2c5
commit cd9c9f8561

64
Jenkinsfile vendored
View File

@@ -62,44 +62,41 @@ pipeline {
}
}
stage ('Deploy') {
parallel {
stage ('Deploy Docs') {
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}Two -u root -v /tmp:/tmp") {
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
try {
sh "ci/deployDocs.sh"
}
catch (e) {
currentBuild.result = "FAILED: deploy docs"
throw e
}
}
stage ('Deploy Docs') {
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}Two -u root -v /tmp:/tmp") {
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
try {
sh "ci/deployDocs.sh"
}
catch (e) {
currentBuild.result = "FAILED: deploy docs"
throw e
}
}
}
}
}
stage ('Deploy Artifacts') {
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}One -u root -v /tmp:/tmp") {
withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) {
withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) {
withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) {
withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
try {
sh "ci/deployArtifacts.sh"
}
catch (e) {
currentBuild.result = "FAILED: deploy artifacts"
throw e
}
}
}
}
stage ('Deploy Artifacts') {
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}One -u root -v /tmp:/tmp") {
withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) {
withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) {
withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) {
withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
try {
sh "ci/deployArtifacts.sh"
}
catch (e) {
currentBuild.result = "FAILED: deploy artifacts"
throw e
}
}
}
@@ -111,6 +108,7 @@ pipeline {
}
}
}
post {
changed {
script {