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