Skip to content

Commit 37def22

Browse files
committed
#3 Jenkins: Fix isBuildSuccessful().
Build result == SUCCESS seems not to be set during pipeline execution.
1 parent 72570ce commit 37def22

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Jenkinsfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ private boolean shouldBranchBeDeployed() {
9292
}
9393

9494
private boolean isBuildSuccessful() {
95-
currentBuild.currentResult == 'SUCCESS' && currentBuild.result == 'SUCCESS'
95+
currentBuild.currentResult == 'SUCCESS' &&
96+
// Build result == SUCCESS seems not to set be during pipeline execution.
97+
(currentBuild.result == null || currentBuild.result == 'SUCCESS')
9698
}
9799

98100
void initMaven(Maven mvn) {

0 commit comments

Comments
 (0)