Retry Jenkins CI tests up to 3 times to improve reliability (#3769)
This commit is contained in:
parent
ea99b53d8e
commit
7a7269e983
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -74,6 +74,7 @@ def buildPlatformCmake(buildName, conf, nodeReq, dockerTarget) {
|
|||||||
def test_suite = conf["withGpu"] ? (conf["multiGpu"] ? "mgpu" : "gpu") : "cpu"
|
def test_suite = conf["withGpu"] ? (conf["multiGpu"] ? "mgpu" : "gpu") : "cpu"
|
||||||
// Build node - this is returned result
|
// Build node - this is returned result
|
||||||
node(nodeReq) {
|
node(nodeReq) {
|
||||||
|
retry(3) {
|
||||||
unstash name: 'srcs'
|
unstash name: 'srcs'
|
||||||
echo """
|
echo """
|
||||||
|===== XGBoost CMake build =====
|
|===== XGBoost CMake build =====
|
||||||
@ -100,3 +101,4 @@ def buildPlatformCmake(buildName, conf, nodeReq, dockerTarget) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ pipeline {
|
|||||||
label 'linux && cpu && restricted'
|
label 'linux && cpu && restricted'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
retry(3) {
|
||||||
unstash name: 'srcs'
|
unstash name: 'srcs'
|
||||||
script {
|
script {
|
||||||
def commit_id = "${GIT_COMMIT}"
|
def commit_id = "${GIT_COMMIT}"
|
||||||
@ -68,6 +69,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Jenkins: Build artifacts') {
|
stage('Jenkins: Build artifacts') {
|
||||||
steps {
|
steps {
|
||||||
@ -95,6 +97,7 @@ def buildPlatformCmake(buildName, conf, nodeReq, dockerTarget) {
|
|||||||
}
|
}
|
||||||
// Build node - this is returned result
|
// Build node - this is returned result
|
||||||
node(nodeReq) {
|
node(nodeReq) {
|
||||||
|
retry(3) {
|
||||||
unstash name: 'srcs'
|
unstash name: 'srcs'
|
||||||
echo """
|
echo """
|
||||||
|===== XGBoost CMake build =====
|
|===== XGBoost CMake build =====
|
||||||
@ -114,3 +117,4 @@ def buildPlatformCmake(buildName, conf, nodeReq, dockerTarget) {
|
|||||||
archiveArtifacts artifacts: "${distDir}/**/*.*", allowEmptyArchive: true
|
archiveArtifacts artifacts: "${distDir}/**/*.*", allowEmptyArchive: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user