Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created October 2, 2022 16:14
Show Gist options
  • Select an option

  • Save KyMidd/0413139bdfa3ec53ea843676d5ffacc3 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/0413139bdfa3ec53ea843676d5ffacc3 to your computer and use it in GitHub Desktop.
curl -s -X GET -u "$userName:$api_token" "${urlOfJenkinsServer}/job/${jenkinsJobName}/api/json?depth=10&tree=builds\[queueId,id,building,result,url\]&pretty=true" \
| jq -r ".builds[] \
| select(.id==\"${JOBID}\") \
| .url" \
| head -n 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment