Skip to content

Commit

Permalink
Retry Jenkins CI tests up to 3 times to improve reliability (redux) (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 authored and alois-bissuel committed Dec 4, 2018
1 parent 11fd973 commit e6ff3ee
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions Jenkinsfile-restricted
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,21 @@ pipeline {
}
}
stage('Jenkins: Build doc') {
retry(3) {
agent {
label 'linux && cpu && restricted'
}
steps {
unstash name: 'srcs'
script {
def commit_id = "${GIT_COMMIT}"
def branch_name = "${GIT_LOCAL_BRANCH}"
echo 'Building doc...'
dir ('jvm-packages') {
sh "bash ./build_doc.sh ${commit_id}"
archiveArtifacts artifacts: "${commit_id}.tar.bz2", allowEmptyArchive: true
echo 'Deploying doc...'
withAWS(credentials:'xgboost-doc-bucket') {
s3Upload file: "${commit_id}.tar.bz2", bucket: 'xgboost-docs', acl: 'PublicRead', path: "${branch_name}.tar.bz2"
steps {
script {
retry(3) {
node('linux && cpu && restricted') {
unstash name: 'srcs'
def commit_id = "${GIT_COMMIT}"
def branch_name = "${GIT_LOCAL_BRANCH}"
echo 'Building doc...'
dir ('jvm-packages') {
sh "bash ./build_doc.sh ${commit_id}"
archiveArtifacts artifacts: "${commit_id}.tar.bz2", allowEmptyArchive: true
echo 'Deploying doc...'
withAWS(credentials:'xgboost-doc-bucket') {
s3Upload file: "${commit_id}.tar.bz2", bucket: 'xgboost-docs', acl: 'PublicRead', path: "${branch_name}.tar.bz2"
}
}
}
}
Expand Down

0 comments on commit e6ff3ee

Please sign in to comment.