Skip to content

Commit

Permalink
Adding catchError to continue test stages
Browse files Browse the repository at this point in the history
  • Loading branch information
rsundriyal committed Sep 12, 2024
1 parent c2eef79 commit 44bd7a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -191,6 +194,7 @@ pipeline {
)
echo "${params.TEST_PIPELINES_PATH}/${params.REGULAR_PIPELINE} #${regularResult.number} succeeded."
}
}
}
}

Expand Down

0 comments on commit 44bd7a1

Please sign in to comment.