Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56430

In latest version of pipeline plugins, currentBuild.result is not correctly set any more for unstable/failure/aborted builds

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      After upgrading to Jenkins 2.150.3 and all Pipeline plugins to their latest version, we have severe problems with internal handling of build result. Even when there are build failures, timeouts etc. the value of currentBuild.result is still null, causing issues like sending "success" mails, ClaimPublisher not being triggered etc.

      The status is displayed correctly in Stage View and Blue Ocean, though.

      Attached minimal Jenkinsfile (producing failed build) results in this output:

      [Pipeline] Start of Pipeline (hide)
      [Pipeline] node
      Running on xxxxx in /home/lf4linux/yyyyy
      [Pipeline]
      Unknown macro: { [Pipeline] stage [Pipeline] Unknown macro}
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline]
      Unknown macro:

      Unknown macro: { (Test) Stage "Test" skipped due to earlier failure(s) [Pipeline] }

      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Declarative: Post Actions)
      [Pipeline] echo
      result = null
      [Pipeline] echo
      currentResult = SUCCESS
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code 1
      Finished: FAILURE

      Even when using the error step, the result property is still not set (meaning SUCCESS):

      [Pipeline] { (Declarative: Post Actions)
      [Pipeline] echo
      result = null
      [Pipeline] echo
      currentResult = SUCCESS
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: some error here!!!
      Finished: FAILURE

      I haven't read about changed behavior in this area, so I assume this is a bug somewhere in the pipeline plugins...

      Any help is greatly appreciated. I'd be willing to rollback the upgrade we did last week, if I just knew which of the 95 plugins we upgraded is causing this.

      Jenkins: 2.150.3; Pipeline Plugins: 1.3.5 (let me know if you need to know other plugin versions)

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                chamshoff Christoph Amshoff
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: