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

            chamshoff Christoph Amshoff created issue -
            chamshoff Christoph Amshoff made changes -
            Field Original Value New Value
            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:
            {color:#9a9999}[Pipeline] Start of Pipeline{color}{color:#9a9999}[Pipeline] node{color}Running on [xxxx|http://jenkins:8080/computer/mu-s-linsrv33/] in /home/lf4linux/xxxx{color:#9a9999}[Pipeline] {{color}{color:#9a9999}[Pipeline] stage{color}{color:#9a9999}[Pipeline] { (Build){color}{color:#9a9999}[Pipeline] echo{color}build started...{color:#9a9999}[Pipeline] sleep{color}Sleeping for 2 sec{color:#9a9999}[Pipeline] sh{color}+ cp with-wrong-syntax
            cp: missing destination file operand after 'with-wrong-syntax'
            Try 'cp --help' for more information.{color:#9a9999}[Pipeline] }{color}{color:#9a9999}[Pipeline] // stage{color}{color:#9a9999}[Pipeline] stage{color}{color:#9a9999}[Pipeline] { (Test){color}Stage "Test" skipped due to earlier failure(s){color:#9a9999}[Pipeline] }{color}{color:#9a9999}[Pipeline] // stage{color}{color:#9a9999}[Pipeline] stage{color}{color:#9a9999}[Pipeline] { (Declarative: Post Actions){color}{color:#9a9999}[Pipeline] echo{color}result = null{color:#9a9999}[Pipeline] echo{color}currentResult = SUCCESS{color:#9a9999}[Pipeline] }{color}{color:#9a9999}[Pipeline] // stage{color}{color:#9a9999}[Pipeline] }{color}{color:#9a9999}[Pipeline] // node{color}{color:#9a9999}[Pipeline] End of Pipeline
            ERROR: script returned exit code 1
            Finished: FAILURE{color}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {color:#9a9999}[Pipeline] { (Declarative: Post Actions){color}{color:#9a9999}[Pipeline] echo{color}result = null{color:#9a9999}[Pipeline] echo{color}currentResult = SUCCESS{color:#9a9999}[Pipeline] }{color}{color:#9a9999}[Pipeline] // stage{color}{color:#9a9999}[Pipeline] }{color}{color:#9a9999}[Pipeline] // node{color}{color:#9a9999}[Pipeline] End of Pipeline{color}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. Let me know if you need more info on plugin version etc.
            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:
            {quote}{{[Pipeline] Start of Pipeline}}
            {{[Pipeline] node}}
            {{Running on mu-s-linsrv33 in /home/lf4linux/builds/jenkins-slave/workspace/lfjee/Experimental/test}}
            {{[Pipeline] {}}
            {{[Pipeline] stage}}
            {{[Pipeline] { (Build)}}
            {{[Pipeline] echo}}
            {{build started...}}
            {{[Pipeline] sleep}}
            {{Sleeping for 2 sec}}
            {{[Pipeline] sh}}
            {{+ cp with-wrong-syntax}}
            {{cp: missing destination file operand after 'with-wrong-syntax'}}
            {{Try 'cp --help' for more information.}}
            {{[Pipeline] }}}
            {{[Pipeline] // stage}}
            {{[Pipeline] stage}}
            {{[Pipeline] { (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}}{quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}{{[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}}
            {quote}
            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. Let me know if you need more info on plugin version etc.
            chamshoff Christoph Amshoff made changes -
            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:
            {quote}{{[Pipeline] Start of Pipeline}}
            {{[Pipeline] node}}
            {{Running on mu-s-linsrv33 in /home/lf4linux/builds/jenkins-slave/workspace/lfjee/Experimental/test}}
            {{[Pipeline] {}}
            {{[Pipeline] stage}}
            {{[Pipeline] { (Build)}}
            {{[Pipeline] echo}}
            {{build started...}}
            {{[Pipeline] sleep}}
            {{Sleeping for 2 sec}}
            {{[Pipeline] sh}}
            {{+ cp with-wrong-syntax}}
            {{cp: missing destination file operand after 'with-wrong-syntax'}}
            {{Try 'cp --help' for more information.}}
            {{[Pipeline] }}}
            {{[Pipeline] // stage}}
            {{[Pipeline] stage}}
            {{[Pipeline] { (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}}{quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}{{[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}}
            {quote}
            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. Let me know if you need more info on plugin version etc.
            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:
            {quote}{{[Pipeline] Start of Pipeline}}
             {{[Pipeline] node}}
             {{Running on mu-s-linsrv33 in /home/lf4linux/builds/jenkins-slave/workspace/lfjee/Experimental/test}}
             {{[Pipeline] {}}
             {{[Pipeline] stage}}
             {{[Pipeline] { (Build)}}
             {{[Pipeline] echo}}
             {{build started...}}
             {{[Pipeline] sleep}}
             {{Sleeping for 2 sec}}
             {{[Pipeline] sh}}
             {{+ cp with-wrong-syntax}}
             {{cp: missing destination file operand after 'with-wrong-syntax'}}
             {{Try 'cp --help' for more information.}}
             {{[Pipeline] }}}
             {{[Pipeline] // stage}}
             {{[Pipeline] stage}}
             {{[Pipeline] { (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}}
            {quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}{{}}{{[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}}
            {quote}
            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. Let me know if you need more info on plugin version etc.
            chamshoff Christoph Amshoff made changes -
            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:
            {quote}{{[Pipeline] Start of Pipeline}}
             {{[Pipeline] node}}
             {{Running on mu-s-linsrv33 in /home/lf4linux/builds/jenkins-slave/workspace/lfjee/Experimental/test}}
             {{[Pipeline] {}}
             {{[Pipeline] stage}}
             {{[Pipeline] { (Build)}}
             {{[Pipeline] echo}}
             {{build started...}}
             {{[Pipeline] sleep}}
             {{Sleeping for 2 sec}}
             {{[Pipeline] sh}}
             {{+ cp with-wrong-syntax}}
             {{cp: missing destination file operand after 'with-wrong-syntax'}}
             {{Try 'cp --help' for more information.}}
             {{[Pipeline] }}}
             {{[Pipeline] // stage}}
             {{[Pipeline] stage}}
             {{[Pipeline] { (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}}
            {quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}{{}}{{[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}}
            {quote}
            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. Let me know if you need more info on plugin version etc.
            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:
            {quote}
            [Pipeline] Start of Pipeline (hide)
            [Pipeline] node
            Running on xxxxx in /home/lf4linux/yyyyy
            [Pipeline] \{
            [Pipeline] stage
            [Pipeline] \{ (Build)
            [Pipeline] echo
            build started...
            [Pipeline] sleep
            Sleeping for 2 sec
            [Pipeline] sh
            + cp with-wrong-syntax
            cp: missing destination file operand after 'with-wrong-syntax'
            Try 'cp --help' for more information.
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] stage
            [Pipeline] \{ (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
            {quote}

            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}
            [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
            {quote}
            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. Let me know if you need more info on plugin version etc.
            chamshoff Christoph Amshoff made changes -
            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:
            {quote}
            [Pipeline] Start of Pipeline (hide)
            [Pipeline] node
            Running on xxxxx in /home/lf4linux/yyyyy
            [Pipeline] \{
            [Pipeline] stage
            [Pipeline] \{ (Build)
            [Pipeline] echo
            build started...
            [Pipeline] sleep
            Sleeping for 2 sec
            [Pipeline] sh
            + cp with-wrong-syntax
            cp: missing destination file operand after 'with-wrong-syntax'
            Try 'cp --help' for more information.
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] stage
            [Pipeline] \{ (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
            {quote}

            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}
            [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
            {quote}
            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. Let me know if you need more info on plugin version etc.
            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:
            {quote}[Pipeline] Start of Pipeline (hide)
             [Pipeline] node
             Running on xxxxx in /home/lf4linux/yyyyy
             [Pipeline] {
             [Pipeline] stage
             [Pipeline] { (Build)
             [Pipeline] echo
             build started...
             [Pipeline] sleep
             Sleeping for 2 sec
             [Pipeline] sh
             + cp with-wrong-syntax
             cp: missing destination file operand after 'with-wrong-syntax'
             Try 'cp --help' for more information.
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] stage
             [Pipeline] { (Test)
             Stage "Test" skipped due to earlier failure(s)
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] stage
             [Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#FF0000}result = null{color}
             [Pipeline] echo
             {color:#FF0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#FF0000}ERROR: script returned exit code 1{color}
            {color:#FF0000} Finished: FAILURE{color}
            {quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}[Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#FF0000}result = null{color}
             [Pipeline] echo
             {color:#FF0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#FF0000}ERROR: some error here!!!{color}
            {color:#FF0000} Finished: FAILURE{color}
            {quote}
            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. Let me know if you need more info on plugin version etc.
            chamshoff Christoph Amshoff made changes -
            Summary In pipeline, currentBuild.result is not set correctly for unstable/failure In latest version of pipeline plugins, currentBuild.result is not correctly set any more for unstable/failure/aborted builds
            chamshoff Christoph Amshoff made changes -
            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:
            {quote}[Pipeline] Start of Pipeline (hide)
             [Pipeline] node
             Running on xxxxx in /home/lf4linux/yyyyy
             [Pipeline] {
             [Pipeline] stage
             [Pipeline] { (Build)
             [Pipeline] echo
             build started...
             [Pipeline] sleep
             Sleeping for 2 sec
             [Pipeline] sh
             + cp with-wrong-syntax
             cp: missing destination file operand after 'with-wrong-syntax'
             Try 'cp --help' for more information.
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] stage
             [Pipeline] { (Test)
             Stage "Test" skipped due to earlier failure(s)
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] stage
             [Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#FF0000}result = null{color}
             [Pipeline] echo
             {color:#FF0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#FF0000}ERROR: script returned exit code 1{color}
            {color:#FF0000} Finished: FAILURE{color}
            {quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}[Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#FF0000}result = null{color}
             [Pipeline] echo
             {color:#FF0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#FF0000}ERROR: some error here!!!{color}
            {color:#FF0000} Finished: FAILURE{color}
            {quote}
            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. Let me know if you need more info on plugin version etc.
            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:
            {quote}[Pipeline] Start of Pipeline (hide)
             [Pipeline] node
             Running on xxxxx in /home/lf4linux/yyyyy
             [Pipeline] {
             [Pipeline] stage
             [Pipeline]
            Unknown macro: \{ (Build) [Pipeline] echo build started... [Pipeline] sleep Sleeping for 2 sec [Pipeline] sh + cp with-wrong-syntax cp}
            [Pipeline] // stage
             [Pipeline] stage
             [Pipeline]
            Unknown macro: \{ (Test) Stage "Test" skipped due to earlier failure(s) [Pipeline] }
            [Pipeline] // stage
             [Pipeline] stage
             [Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#ff0000}result = null{color}
             [Pipeline] echo
             {color:#ff0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#ff0000}ERROR: script returned exit code 1{color}
             {color:#ff0000} Finished: FAILURE{color}
            {quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}[Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#ff0000}result = null{color}
             [Pipeline] echo
             {color:#ff0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#ff0000}ERROR: some error here!!!{color}
             {color:#ff0000} Finished: FAILURE{color}
            {quote}
            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.

            Let me know if you need more info on plugin version etc.
            chamshoff Christoph Amshoff made changes -
            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:
            {quote}[Pipeline] Start of Pipeline (hide)
             [Pipeline] node
             Running on xxxxx in /home/lf4linux/yyyyy
             [Pipeline] {
             [Pipeline] stage
             [Pipeline]
            Unknown macro: \{ (Build) [Pipeline] echo build started... [Pipeline] sleep Sleeping for 2 sec [Pipeline] sh + cp with-wrong-syntax cp}
            [Pipeline] // stage
             [Pipeline] stage
             [Pipeline]
            Unknown macro: \{ (Test) Stage "Test" skipped due to earlier failure(s) [Pipeline] }
            [Pipeline] // stage
             [Pipeline] stage
             [Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#ff0000}result = null{color}
             [Pipeline] echo
             {color:#ff0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#ff0000}ERROR: script returned exit code 1{color}
             {color:#ff0000} Finished: FAILURE{color}
            {quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}[Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#ff0000}result = null{color}
             [Pipeline] echo
             {color:#ff0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#ff0000}ERROR: some error here!!!{color}
             {color:#ff0000} Finished: FAILURE{color}
            {quote}
            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.

            Let me know if you need more info on plugin version etc.
            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:
            {quote}[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: { (Test) Stage "Test" skipped due to earlier failure(s) [Pipeline] }
             [Pipeline] // stage
             [Pipeline] stage
             [Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#ff0000}result = null{color}
             [Pipeline] echo
             {color:#ff0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#ff0000}ERROR: script returned exit code 1{color}
             {color:#ff0000} Finished: FAILURE{color}
            {quote}
            Even when using the error step, the result property is still not set (meaning SUCCESS):
            {quote}[Pipeline] { (Declarative: Post Actions)
             [Pipeline] echo
             {color:#ff0000}result = null{color}
             [Pipeline] echo
             {color:#ff0000}currentResult = SUCCESS{color}
             [Pipeline] }
             [Pipeline] // stage
             [Pipeline] }
             [Pipeline] // node
             [Pipeline] End of Pipeline
             {color:#ff0000}ERROR: some error here!!!{color}
             {color:#ff0000} Finished: FAILURE{color}
            {quote}
            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)
            abayer Andrew Bayer made changes -
            Link This issue duplicates JENKINS-56402 [ JENKINS-56402 ]
            abayer Andrew Bayer made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Duplicate [ 3 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: