@@ -6,7 +6,6 @@ def projectProperties = [
66properties(projectProperties)
77
88def SUCCESS = hudson.model.Result . SUCCESS . toString()
9-
109currentBuild. result = SUCCESS
1110
1211try {
1716 checkout scm
1817 try {
1918 withEnv([" JAVA_HOME=${ tool 'jdk8'} " ]) {
20- sh ' ./gradlew clean check --no-daemon --refresh-dependencies' -- stacktrace
19+ sh ' ./gradlew clean check --no-daemon --refresh-dependencies --stacktrace'
2120 }
2221 }
2322 catch (e) {
@@ -35,31 +34,43 @@ try {
3534 if (currentBuild. result == ' SUCCESS' ) {
3635 parallel artifacts : {
3736 stage(' Deploy Artifacts' ) {
38- node {
37+ node( ' linux ' ) {
3938 checkout scm
40- withCredentials([file(credentialsId : ' spring-signing-secring.gpg' , variable : ' SIGNING_KEYRING_FILE' )]) {
41- withCredentials([string(credentialsId : ' spring-gpg-passphrase' , variable : ' SIGNING_PASSWORD' )]) {
42- withCredentials([usernamePassword(credentialsId : ' oss-token' , passwordVariable : ' OSSRH_PASSWORD' , usernameVariable : ' OSSRH_USERNAME' )]) {
43- withCredentials([usernamePassword(credentialsId : ' 02bd1690-b54f-4c9f-819d-a77cb7a9822c' , usernameVariable : ' ARTIFACTORY_USERNAME' , passwordVariable : ' ARTIFACTORY_PASSWORD' )]) {
44- withEnv([" JAVA_HOME=${ tool 'jdk8'} " ]) {
45- sh " ./gradlew deployArtifacts finalizeDeployArtifacts -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE -Psigning.keyId=$SPRING_SIGNING_KEYID -Psigning.password='$SIGNING_PASSWORD ' -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --refresh-dependencies --no-daemon --stacktrace"
39+ try {
40+ withCredentials([file(credentialsId : ' spring-signing-secring.gpg' , variable : ' SIGNING_KEYRING_FILE' )]) {
41+ withCredentials([string(credentialsId : ' spring-gpg-passphrase' , variable : ' SIGNING_PASSWORD' )]) {
42+ withCredentials([usernamePassword(credentialsId : ' oss-token' , passwordVariable : ' OSSRH_PASSWORD' , usernameVariable : ' OSSRH_USERNAME' )]) {
43+ withCredentials([usernamePassword(credentialsId : ' 02bd1690-b54f-4c9f-819d-a77cb7a9822c' , usernameVariable : ' ARTIFACTORY_USERNAME' , passwordVariable : ' ARTIFACTORY_PASSWORD' )]) {
44+ withEnv([" JAVA_HOME=${ tool 'jdk8'} " ]) {
45+ sh ' ./gradlew deployArtifacts finalizeDeployArtifacts --no-daemon --refresh-dependencies --stacktrace -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE -Psigning.keyId=$SPRING_SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD'
46+ }
4647 }
4748 }
4849 }
4950 }
5051 }
52+ catch (e) {
53+ currentBuild. result = ' FAILED: artifacts'
54+ throw e
55+ }
5156 }
5257 }
53- }
58+ },
5459 docs : {
5560 stage(' Deploy Docs' ) {
56- node {
61+ node( ' linux ' ) {
5762 checkout scm
58- withCredentials([file(credentialsId : ' docs.spring.io-jenkins_private_ssh_key' , variable : ' DEPLOY_SSH_KEY' )]) {
59- withEnv([" JAVA_HOME=${ tool 'jdk8'} " ]) {
60- sh " ./gradlew deployDocs -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
63+ try {
64+ withCredentials([file(credentialsId : ' docs.spring.io-jenkins_private_ssh_key' , variable : ' DEPLOY_SSH_KEY' )]) {
65+ withEnv([" JAVA_HOME=${ tool 'jdk8'} " ]) {
66+ sh ' ./gradlew deployDocs --no-daemon --refresh-dependencies --stacktrace -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME'
67+ }
6168 }
6269 }
70+ catch (e) {
71+ currentBuild. result = ' FAILED: docs'
72+ throw e
73+ }
6374 }
6475 }
6576 }
@@ -68,24 +79,23 @@ try {
6879finally {
6980
7081 def buildStatus = currentBuild. result
71- def buildNotSuccess = ! SUCCESS . equals(buildStatus)
82+ def buildNotSuccess = ! SUCCESS . equals(buildStatus)
7283 def lastBuildNotSuccess = ! SUCCESS . equals(currentBuild. previousBuild?. result)
7384
7485 if (buildNotSuccess || lastBuildNotSuccess) {
75-
76- stage(' Notifiy' ) {
86+ stage(' Notify' ) {
7787 node {
7888
7989 final def RECIPIENTS = [[$class : ' DevelopersRecipientProvider' ], [$class : ' RequesterRecipientProvider' ]]
8090
8191 def subject = " ${ buildStatus} : Build ${ env.JOB_NAME} ${ env.BUILD_NUMBER} status is now ${ buildStatus} "
82- def details = """ The build status changed to ${ buildStatus} . For details see ${ env.BUILD_URL} "" "
92+ def details = " The build status changed to ${ buildStatus} . For details see ${ env.BUILD_URL} "
8393
84- emailext (
85- subject : subject,
86- body : details,
87- recipientProviders : RECIPIENTS ,
88- to : " $GEODE_TEAM_EMAILS "
94+ emailext(
95+ subject : subject,
96+ body : details,
97+ recipientProviders : RECIPIENTS ,
98+ to : " $GEODE_TEAM_EMAILS "
8999 )
90100 }
91101 }
0 commit comments