GNU bug report logs -
#47929
[PATCH 0/5] Add manifest support to channel-with-substitutes-available
Previous Next
Full log
Message #14 received at 47929 <at> debbugs.gnu.org (full text, mbox):
* guix/ci.scm (dashboard-url, dashboard-register): New procedures.
---
guix/ci.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/guix/ci.scm b/guix/ci.scm
index 780e90ef32..78ab739340 100644
--- a/guix/ci.scm
+++ b/guix/ci.scm
@@ -65,6 +65,8 @@
evaluations-for-commit
manifest->jobs
+ dashboard-url
+ dashboard-register
channel-with-substitutes-available))
;;; Commentary:
@@ -282,6 +284,26 @@ evaluation with the higher successful jobs count."
(package->job-name (package-name package)))
packages)))
+(define (dashboard-url url id)
+ "Return the url of the dashboard with the given ID on the CI server at URL."
+ (format #f "~a/dashboard/~a" url id))
+
+(define* (dashboard-register url packages
+ #:key
+ (specification "master"))
+ "Register a dashboard for the packages jobs of the given SPECIFICATION using
+the CI server at URL. Returns the newly created dashboard id or false if it
+could not be created."
+ (let* ((jobs (manifest->jobs
+ (packages->manifest packages)))
+ (names (string-join jobs ","))
+ (id (json->scm
+ (http-fetch
+ (format #f "~a/api/dashboard/register?spec=~a&names=~a"
+ url specification names)))))
+ (and id
+ (assoc-ref id "id"))))
+
(define* (latest-checkouts-with-substitutes url jobs)
"Return a list of latest checkouts, sorted by descending substitutes
coverage of the given JOBS list on the CI server at URL. Only evaluations for
--
2.31.1
This bug report was last modified 4 years and 152 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.