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

/wfapi/describe returns wrong overall status ("NOT EXECUTED") for jenkins job that was flagged with NOT_BUILT

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • Jenkins 2.289.1 on openshift 3

      we set the BUILD_STATUS in the current build to NOT_BUILT thru the standard API

                      currentBuild.result = 'NOT_BUILT'
       
       
      and it's showing up correctly in blue ocean as "not_built" - and also in the logs:

      [Pipeline] }[Pipeline] // withCredentials[Pipeline] }[Pipeline] // wrap[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineFinished: NOT_BUILT

       
      but if the WF API (/wfapi/describe) is used: 
       
      {"_links":{"self":{"href":"https://..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/wfapi/describe"}},"id":"2","name":"#2","status":"NOT_EXECUTED","startTimeMillis":1642165415793,"endTimeMillis":1642165463650,"durationMillis":47857,"queueDurationMillis":71,"pauseDurationMillis":0,"stages":\\\\{"_links":{"self":{"href":"https://j..../job/mpoct1-cd/job/mpoct1-cd-database-release-13/2/execution/node/17/wfapi/describe"}},"id":"17","name":"odsPipeline start","execNode":"","status":"SUCCESS","startTimeMillis":1642165458315,"durationMillis":4006,"pauseDurationMillis":0}
       
      one can see the status as "status":"NOT_EXECUTED" which is clearly wrong. This is causing downstream issues for example in the openshift plugin which shows the status "pending" for the job - rather than "completed"
       

            Unassigned Unassigned
            clemensutschig Clemens Utschig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: