From e8881f6f25ce7a514b1383d3f900140419f546d7 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 13 Nov 2021 14:02:17 -0300 Subject: [PATCH] Add per-stage failure to Jenkins pipeline --- .ci/Jenkinsfile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 5f5431639..9a3f67472 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -53,20 +53,24 @@ pipeline { stages { stage('Build Windows') { steps { - node('windows') { - gitClone() - windowsBuild() - saveArtifacts() + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + node('windows') { + gitClone() + windowsBuild() + saveArtifacts() + } } } } stage('Build Linux') { steps { - node('debian') { - gitClone() - unixBuild() - saveArtifacts() + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + node('debian') { + gitClone() + unixBuild() + saveArtifacts() + } } } }