-
Bug
-
Resolution: Not A Defect
-
Major
-
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