guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: ci: Add "evaluation" method.


From: guix-commits
Subject: 02/02: ci: Add "evaluation" method.
Date: Mon, 7 Dec 2020 10:17:03 -0500 (EST)

mothacehe pushed a commit to branch master
in repository guix.

commit 1d229a34b7cb0d28721ca99f337de444381ec1a0
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Mon Dec 7 15:38:16 2020 +0100

    ci: Add "evaluation" method.
    
    * guix/ci.scm (evaluation): New procedure.
---
 guix/ci.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/guix/ci.scm b/guix/ci.scm
index 44b7673..f429bf1 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]