Skip to content

Commit

Permalink
Retry CI Deploy step up to 3 times (dmlc#232)
Browse files Browse the repository at this point in the history
Deploy stage may fail randomly due to an unknown bug in nbsphinx or notedown.
  • Loading branch information
leezu authored and szha committed Jul 26, 2018
1 parent 42ae302 commit 65c019d
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,20 @@ stage("Deploy") {
node {
ws('workspace/gluon-nlp-docs') {
checkout scm
sh """#!/bin/bash
printenv
git clean -f -d -x --exclude='tests/externaldata/*' --exclude=conda
conda env update --prune -f env/doc.yml -p conda/docs
conda activate ./conda/docs
conda list
python setup.py install
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
make clean
make docs
"""

retry(3) {
sh """#!/bin/bash
printenv
git clean -f -d -x --exclude='tests/externaldata/*' --exclude=conda
conda env update --prune -f env/doc.yml -p conda/docs
conda activate ./conda/docs
conda list
python setup.py install
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
make clean
make docs
"""
}

if (env.BRANCH_NAME.startsWith("PR-")) {
sh """#!/bin/bash
Expand Down

0 comments on commit 65c019d

Please sign in to comment.