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

Unable to manipulate build result as expected

    XMLWordPrintable

Details

    Description

      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'

      Attachments

        Activity

          jrkoiter Joost created issue -
          jrkoiter Joost made changes -
          Field Original Value New Value
          Description 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'}}
          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'
          jrkoiter Joost made changes -
          Description 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'
          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'
          jrkoiter Joost made changes -
          Description 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'
          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}
          jrkoiter Joost made changes -
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 173319 ] JNJira + In-Review [ 210211 ]

          People

            Unassigned Unassigned
            jrkoiter Joost
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: