Skip to content

Commit d74ac85

Browse files
authored
Merge pull request #98 from infosiftr/unstable-skipping
Set job to "unstable" if skipping entire (non-empty) queue
2 parents 6ad2e19 + c24c8cd commit d74ac85

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Jenkinsfile.trigger

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ node {
8383
jobName += 'queue: 0'
8484
breakEarly = true
8585
}
86-
if (skips > 0 ) {
86+
if (skips > 0) {
8787
jobName += ' skip: ' + skips
88+
if (breakEarly) {
89+
// if we're skipping some builds but the effective queue is empty, we want to set the job as "unstable" instead of successful (so we know there's still *something* that needs to build but it isn't being built right now)
90+
currentBuild.result = 'UNSTABLE'
91+
}
8892
// queue to build might be empty, be we still need to record these skipped builds
8993
breakEarly = false
9094
}

0 commit comments

Comments
 (0)