From: Mathieu Othacehe <othacehe@gnu.org>
To: 47929@debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#47929] [PATCH 3/5] ci: Add dashboard procedures.
Date: Wed, 21 Apr 2021 14:21:06 +0200 [thread overview]
Message-ID: <20210421122108.2344-3-othacehe@gnu.org> (raw)
In-Reply-To: <20210421122108.2344-1-othacehe@gnu.org>
* 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
next prev parent reply other threads:[~2021-04-21 12:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 12:16 [bug#47929] [PATCH 0/5] Add manifest support to channel-with-substitutes-available Mathieu Othacehe
2021-04-21 12:21 ` [bug#47929] [PATCH 1/5] ci: " Mathieu Othacehe
2021-04-21 12:21 ` [bug#47929] [PATCH 2/5] scripts: pull: Load (gnu packages) module Mathieu Othacehe
2021-04-21 12:21 ` Mathieu Othacehe [this message]
2021-04-21 12:21 ` [bug#47929] [PATCH 4/5] scripts: weather: Add packages dashboard support Mathieu Othacehe
2021-04-21 12:21 ` [bug#47929] [PATCH 5/5] ui: Disable hyperlink support inside screen Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210421122108.2344-3-othacehe@gnu.org \
--to=othacehe@gnu.org \
--cc=47929@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.