Skip to content

Commit

Permalink
Add script to lookup incompletes from an openQA instance using databa…
Browse files Browse the repository at this point in the history
…se calls
  • Loading branch information
okurz committed Nov 15, 2019
1 parent 4433cd5 commit 2accc66
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions openqa-monitor-incompletes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh -e
host="${host:-"openqa.opensuse.org"}"
scheme="${scheme:-"https"}"
failed_since="${failed_since:-"(NOW() - interval '24 hour')"}"
query="${query:-"select id,test from jobs where (result='incomplete' and t_finished >= $failed_since and id not in (select job_id from comments where job_id is not null));"}"
for i in $(ssh "$host" "sudo -u geekotest psql --no-align --tuples-only --command=\"$query\" openqa"); do
url="$scheme://$host/tests/${i%|*}"
details="${i#*|}"
echo "$url" "$details"
done

0 comments on commit 2accc66

Please sign in to comment.