The wfapi can end up reporting an incorrect status for a child job it the original trigger job's result is forced to unstable.

      The following test case has two jobs the trigger job and the child job. The trigger job builds the child job, waits on it and then sets its own results to UNSTABLE. The child job finishes with a success result.

      What I expect is to be able to look into the wfapi and see that the child job actually was a success, however it is marked as unstable.

      In a similar case where the trigger job result is set to FAILURE the status of the child job is SUCCESS

      Testcase:

      Child Job:
      node {
        currentBuild.setResult("SUCCESS")
      }
      
      
      Trigger Job:
      stage ('run'){   
          build job: "expected_success", propagate: false
          currentBuild.setResult('UNSTABLE')
      }
      

          [JENKINS-42885] wfapi incorrectly reporting build job status

          There are no comments yet on this issue.

            Unassigned Unassigned
            matthall Matthew Hall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: