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

Git Plugin Json call key error for Jenkins job trigged by polling

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins server running on Linux platform.

      After updating Git Plugin to version 2.0.4, Jenkins job that was trigged by polling not retrieving lastBuiltRevision key for JSON call.

      I am using following query in the job to identify last successful build's git SHA key.

      CURL_RESULT=`curl -s -S $JOB_URL'lastSuccessfulBuild/api/json'`
      git_last_successful_build_shakey=`echo "${CURL_RESULT}" | python -c 'import json,sys,os;obj=json.loads(sys.stdin.read());print obj["'"actions"'"][4]["'"lastBuiltRevision"'"]["'"SHA1"'"]'`

      When I use direct JSON URL it is displaying the value but job trigged by polling is not getting the key lastBuiltRevision

            ndeloof Nicolas De Loof
            svasee Vasee Seeva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: