aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-02-03 09:57:26 +0100
committerChristopher Baines <mail@cbaines.net>2020-02-03 09:57:35 +0100
commit00d96647149737d9bad63ab50c39f51faf52aefe (patch)
tree0454d99b870acbf53f058236a4716707149406f2
parent8f0d5b51b1e24a8dfcb876b759f4198c88add821 (diff)
downloaddata-service-00d96647149737d9bad63ab50c39f51faf52aefe.tar
data-service-00d96647149737d9bad63ab50c39f51faf52aefe.tar.gz
Query builds for system test derivations
-rw-r--r--guix-data-service/builds.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/guix-data-service/builds.scm b/guix-data-service/builds.scm
index 64b04ad..35a0c61 100644
--- a/guix-data-service/builds.scm
+++ b/guix-data-service/builds.scm
@@ -467,6 +467,23 @@ WHERE NOT EXISTS (
(string-join (map quote-string revision-commits) ",")
")"))
"
+ UNION ALL
+ SELECT derivations_by_output_details_set.derivation_output_details_set_id
+ FROM guix_revision_system_test_derivations
+ INNER JOIN derivations_by_output_details_set
+ ON guix_revision_system_test_derivations.derivation_id =
+ derivations_by_output_details_set.derivation_id
+ INNER JOIN guix_revisions
+ ON guix_revisions.id = guix_revision_system_test_derivations.guix_revision_id
+"
+ (if (null? revision-commits)
+ ""
+ (string-append
+ "
+ WHERE guix_revisions.commit IN ("
+ (string-join (map quote-string revision-commits) ",")
+ ")"))
+ "
)
ORDER BY derivation_output_details_sets.id, derivation_output_details.id
LIMIT 15000"))