From 44bd7a1ad5d7bb048915a1a74154b7b125eca9a9 Mon Sep 17 00:00:00 2001 From: rsundriyal Date: Thu, 12 Sep 2024 14:46:53 -0400 Subject: [PATCH] Adding catchError to continue test stages --- Jenkinsfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 962738dadf..916dc7decc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -89,7 +89,7 @@ pipeline { dir(path: 'docs/html') { sh """# Move the clamav-documentation here. - cp -r ../../clamav_documentation/* . + cp -r ../../clamav_documentation/ . # Clean-up rm -rf ../../clamav_documentation rm -rf .git .nojekyll CNAME Placeholder || true @@ -154,7 +154,8 @@ pipeline { // Regular and custom tests run sequentially on same infra stage("Package") { steps { - script{ + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + script{ packageResult = build(job: "${params.TEST_PIPELINES_PATH}/${params.PACKAGE_PIPELINE}", propagate: true, wait: true, @@ -171,12 +172,14 @@ pipeline { ) echo "${params.TEST_PIPELINES_PATH}/${params.PACKAGE_PIPELINE} #${packageResult.number} succeeded." } + } } } stage("Regular From-Source") { steps { - script{ + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + script{ regularResult = build(job: "${params.TEST_PIPELINES_PATH}/${params.REGULAR_PIPELINE}", propagate: true, wait: true, @@ -191,6 +194,7 @@ pipeline { ) echo "${params.TEST_PIPELINES_PATH}/${params.REGULAR_PIPELINE} #${regularResult.number} succeeded." } + } } }