diff options
| author | dd <dd@wx.tnyzeq.icu> | 2024-07-12 18:44:49 +0200 |
|---|---|---|
| committer | dd <dd@wx.tnyzeq.icu> | 2024-07-12 18:51:14 +0200 |
| commit | b09e8a1fd981906c2811f2340fe73503c7082320 (patch) | |
| tree | ed82b098092430468546eb8a7f7eab8f5a0e1eb4 | |
| parent | b0cef590024ea5820e7297f338f0d5cc275fa185 (diff) | |
| download | vyos-jenkins-b09e8a1fd981906c2811f2340fe73503c7082320.tar.gz vyos-jenkins-b09e8a1fd981906c2811f2340fe73503c7082320.zip | |
fixed automated job provision first run
| -rw-r--r-- | auto/helper-logic | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auto/helper-logic b/auto/helper-logic index 1151b27..525365d 100644 --- a/auto/helper-logic +++ b/auto/helper-logic @@ -464,8 +464,8 @@ function ProvisionJobs { completed=false started=true url="${JENKINS_URL}/job/${JOB_NAME}/job/${JOB_BRANCH}/api/json" - nextBuildNumber=$(curl -Ss -g --fail-with-body "$url" | jq -r .nextBuildNumber) - if [ $nextBuildNumber -gt 2 ]; then + nextBuildNumber=$(curl -s -g "$url" | jq -r .nextBuildNumber 2> /dev/null) + if [ "$nextBuildNumber" != "" ] && [ $nextBuildNumber -gt 2 ]; then completed=true else url="${JENKINS_URL}/job/${JOB_NAME}/job/${JOB_BRANCH}/1/api/json" |
