Retry Jenkins CI tests up to 3 times to improve reliability (redux) (#3776)

This commit is contained in:
Philip Hyunsu Cho 2018-10-08 11:39:00 -07:00 committed by GitHub
parent 6d42e56c85
commit 11eaf3eed1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,22 +48,21 @@ pipeline {
} }
} }
stage('Jenkins: Build doc') { stage('Jenkins: Build doc') {
retry(3) { steps {
agent { script {
label 'linux && cpu && restricted' retry(3) {
} node('linux && cpu && restricted') {
steps { unstash name: 'srcs'
unstash name: 'srcs' def commit_id = "${GIT_COMMIT}"
script { def branch_name = "${GIT_LOCAL_BRANCH}"
def commit_id = "${GIT_COMMIT}" echo 'Building doc...'
def branch_name = "${GIT_LOCAL_BRANCH}" dir ('jvm-packages') {
echo 'Building doc...' sh "bash ./build_doc.sh ${commit_id}"
dir ('jvm-packages') { archiveArtifacts artifacts: "${commit_id}.tar.bz2", allowEmptyArchive: true
sh "bash ./build_doc.sh ${commit_id}" echo 'Deploying doc...'
archiveArtifacts artifacts: "${commit_id}.tar.bz2", allowEmptyArchive: true withAWS(credentials:'xgboost-doc-bucket') {
echo 'Deploying doc...' s3Upload file: "${commit_id}.tar.bz2", bucket: 'xgboost-docs', acl: 'PublicRead', path: "${branch_name}.tar.bz2"
withAWS(credentials:'xgboost-doc-bucket') { }
s3Upload file: "${commit_id}.tar.bz2", bucket: 'xgboost-docs', acl: 'PublicRead', path: "${branch_name}.tar.bz2"
} }
} }
} }