jq: parsed

after banging my head against it for long enough, the jq parse that i'm 100% convinced worked in test doesn't work, so I was able to work against that.
This commit is contained in:
adam 2024-11-27 15:39:21 -05:00
parent 816bcff09d
commit 056cb4f2a3

View File

@ -83,9 +83,10 @@ pipeline {
while [ -z "\$strRes" ]; while [ -z "\$strRes" ];
do do
sleep 5; sleep 5;
strRes=\$(curl -X GET -s -u ${env.JENKINS_USR}:'${env.JENKINS_PSW}' \ curl -X GET -s -u ${env.JENKINS_USR}:'${env.JENKINS_PSW}' \
alloces.lan:8080/job/gitea.arg.rip/api/json \ alloces.lan:8080/job/gitea.arg.rip/api/json > f.json
| jq ".jobs.[] | select(.name==\"${env.servicename}\")") strRes=\$(jq '.jobs' f.json | jq '.[] | select(.name==\"${env.servicename}\")')
rm f.json
done done
""" """
} }