summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-12-07 15:38:16 +0100
committerMathieu Othacehe <othacehe@gnu.org>2020-12-07 16:15:55 +0100
commit1d229a34b7cb0d28721ca99f337de444381ec1a0 (patch)
tree37a61bd9744cd031bc5eafbcb46039f899f3b54d
parent9087af0323fb88d6269016fb93f3a3d206b0f42f (diff)
downloadguix-1d229a34b7cb0d28721ca99f337de444381ec1a0.tar.gz
ci: Add "evaluation" method.
* guix/ci.scm (evaluation): New procedure.
-rw-r--r--guix/ci.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/ci.scm b/guix/ci.scm
index 44b7673a91..f429bf198f 100644
--- a/guix/ci.scm
+++ b/guix/ci.scm
@@ -50,6 +50,7 @@
             %query-limit
             queued-builds
             latest-builds
+            evaluation
             latest-evaluations
             evaluations-for-commit))
 
@@ -140,6 +141,13 @@ string such as \"x86_64-linux\"), restrict to builds for SYSTEM."
     ;; 'latestbuilds', but Cuirass does.
     (map json->build (vector->list latest))))
 
+(define (evaluation url evaluation)
+  "Return the given EVALUATION performed by the CI server at URL."
+  (let ((evaluation (json-fetch
+                     (string-append url "/api/evaluation?id="
+                                    (number->string evaluation)))))
+    (json->evaluation evaluation)))
+
 (define* (latest-evaluations url #:optional (limit %query-limit))
   "Return the latest evaluations performed by the CI server at URL."
   (map json->evaluation