-
Bug
-
Resolution: Not A Defect
-
Major
-
Jenkins 2.13, Pipeline 2.2.
I am expecting that the following simple pipeline script finishes with status SUCCESS. Instead, it fails:
print "Setting result to FAILURE" currentBuild.result = 'FAILURE' print "Setting result to SUCCESS" currentBuild.result = 'SUCCESS'
[JENKINS-36598] Unable to manipulate build result as expected
Description |
Original:
I am expecting that the following simple pipeline script finished with status SUCCESS. Instead, it fails: {{print "Setting result to FAILURE" currentBuild.result = 'FAILURE' print "Setting result to SUCCESS" currentBuild.result = 'SUCCESS'}} |
New:
I am expecting that the following simple pipeline script finished with status SUCCESS. Instead, it fails: print "Setting result to FAILURE" currentBuild.result = 'FAILURE' print "Setting result to SUCCESS" currentBuild.result = 'SUCCESS' |
Description |
Original:
I am expecting that the following simple pipeline script finished with status SUCCESS. Instead, it fails: print "Setting result to FAILURE" currentBuild.result = 'FAILURE' print "Setting result to SUCCESS" currentBuild.result = 'SUCCESS' |
New:
I am expecting that the following simple pipeline script finishes with status SUCCESS. Instead, it fails: print "Setting result to FAILURE" currentBuild.result = 'FAILURE' print "Setting result to SUCCESS" currentBuild.result = 'SUCCESS' |
Description |
Original:
I am expecting that the following simple pipeline script finishes with status SUCCESS. Instead, it fails: print "Setting result to FAILURE" currentBuild.result = 'FAILURE' print "Setting result to SUCCESS" currentBuild.result = 'SUCCESS' |
New:
I am expecting that the following simple pipeline script finishes with status SUCCESS. Instead, it fails: {noformat}print "Setting result to FAILURE" currentBuild.result = 'FAILURE' print "Setting result to SUCCESS" currentBuild.result = 'SUCCESS'{noformat} |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |
Workflow | Original: JNJira [ 173319 ] | New: JNJira + In-Review [ 210211 ] |
I guess this is as expected:
https://github.com/jenkinsci/jenkins/blob/213363d387736874f1d14d83e57347f757f3ed4f/core/src/main/java/hudson/model/Run.java#L462