Skip to content

Commit

Permalink
Fix handling of jobs without previous jobs
Browse files Browse the repository at this point in the history
Issue: https://progress.opensuse.org/issues/95830

.last_good can be "not found", but also null when there are no previous
jobs.
  • Loading branch information
perlpunk committed Jul 27, 2021
1 parent df22000 commit 763cc4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openqa-investigate
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ trigger_jobs() {
job_url="$host_url/tests/$id"
investigation=$(runcurl -s "$job_url"/investigation_ajax) || return $?
last_good_exists=$(echo "$investigation" | runjq -r '.last_good') || return $?
if [[ "$last_good_exists" = "not found" ]]; then
if [[ "$last_good_exists" = "null" || "$last_good_exists" = "not found" ]]; then
echo "No last good recorded, skipping regression investigation jobs" && return 1
fi
last_good=$(echo "$investigation" | runjq -r '.last_good.text') || return $?
Expand Down

0 comments on commit 763cc4a

Please sign in to comment.