From 6d42e56c8529d6fe9b920bb2563d3a3c612f0e5b Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Mon, 8 Oct 2018 11:24:01 -0700 Subject: [PATCH] Retry Jenkins CI tests up to 3 times to improve reliability (redux) (#3775) --- Jenkinsfile | 4 ++-- Jenkinsfile-restricted | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1bc4b48a9..23d28fc7e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -73,8 +73,8 @@ def buildPlatformCmake(buildName, conf, nodeReq, dockerTarget) { } def test_suite = conf["withGpu"] ? (conf["multiGpu"] ? "mgpu" : "gpu") : "cpu" // Build node - this is returned result - node(nodeReq) { - retry(3) { + retry(3) { + node(nodeReq) { unstash name: 'srcs' echo """ |===== XGBoost CMake build ===== diff --git a/Jenkinsfile-restricted b/Jenkinsfile-restricted index 6f228f4da..825d0bc4f 100644 --- a/Jenkinsfile-restricted +++ b/Jenkinsfile-restricted @@ -48,11 +48,11 @@ pipeline { } } stage('Jenkins: Build doc') { - agent { - label 'linux && cpu && restricted' - } - steps { - retry(3) { + retry(3) { + agent { + label 'linux && cpu && restricted' + } + steps { unstash name: 'srcs' script { def commit_id = "${GIT_COMMIT}" @@ -96,8 +96,8 @@ def buildPlatformCmake(buildName, conf, nodeReq, dockerTarget) { dockerArgs = "--build-arg CUDA_VERSION=" + conf["cudaVersion"] } // Build node - this is returned result - node(nodeReq) { - retry(3) { + retry(3) { + node(nodeReq) { unstash name: 'srcs' echo """ |===== XGBoost CMake build =====