From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id HdCSGPEYgGBiJwEAgWs5BA (envelope-from ) for ; Wed, 21 Apr 2021 14:22:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6LwBE/EYgGA8OAAAB5/wlQ (envelope-from ) for ; Wed, 21 Apr 2021 12:22:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E36AF1AA13 for ; Wed, 21 Apr 2021 14:22:08 +0200 (CEST) Received: from localhost ([::1]:41434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZBrs-0002Yb-1h for larch@yhetil.org; Wed, 21 Apr 2021 08:22:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZBrn-0002XH-Du for guix-patches@gnu.org; Wed, 21 Apr 2021 08:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZBrn-0007Aw-6H for guix-patches@gnu.org; Wed, 21 Apr 2021 08:22:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZBrn-0005aK-2l for guix-patches@gnu.org; Wed, 21 Apr 2021 08:22:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47929] [PATCH 3/5] ci: Add dashboard procedures. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Apr 2021 12:22:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47929 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47929@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 47929-submit@debbugs.gnu.org id=B47929.161900769521404 (code B ref 47929); Wed, 21 Apr 2021 12:22:03 +0000 Received: (at 47929) by debbugs.gnu.org; 21 Apr 2021 12:21:35 +0000 Received: from localhost ([127.0.0.1]:57118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZBrL-0005Z9-6u for submit@debbugs.gnu.org; Wed, 21 Apr 2021 08:21:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZBrF-0005YF-4C for 47929@debbugs.gnu.org; Wed, 21 Apr 2021 08:21:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54765) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZBr9-0006mc-Vk for 47929@debbugs.gnu.org; Wed, 21 Apr 2021 08:21:23 -0400 Received: from [2a01:e0a:19b:d9a0:9576:8bbf:4795:82ee] (port=38154 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lZBr8-0003pa-Tj; Wed, 21 Apr 2021 08:21:23 -0400 From: Mathieu Othacehe Date: Wed, 21 Apr 2021 14:21:06 +0200 Message-Id: <20210421122108.2344-3-othacehe@gnu.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421122108.2344-1-othacehe@gnu.org> References: <20210421122108.2344-1-othacehe@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619007729; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ZUvi0Rp6qgd0t7g6wxsak/KTygvqRFgdpX5gu9COBlE=; b=BmrVGzmGSD44JDfpiVIOFFttNGFLeQQGjn0HJ7KMFLhIInXMFKkRxxvpHM+c2UPVyAjeDk JX0EZKvFIETFfVhBgzTMNhdzZvYcYZYlMTkFacuT+XfaK42wDJztMzt984TrUk5+zV3qVU pxEM9E/GsSbIGNNt+9wU3MXWsQAvt8rTS01mqums0b+sk/pL74S+fsJW0SzzrZalS6TNr5 r8jDP2kEzn4kgqJVs/xP+XoYPkQEdwgB19ojKRP3U7rTdEK85630L09+2L1Eij6US4GevS 6JRa4udNx5CEj4Bdiuvdr2TMhHFoH4qFb7G/g2QymNwDE0MSNExmab/kigHTBQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619007729; a=rsa-sha256; cv=none; b=LqxI8Yo78VE7Pau5qbQDbv9PrbMX2gD5UEmbdZjIRXx9QjsFld4nSm8Fq5fGV8ztv17sPa H/RgffLEveULzYHyOrhtvgFW+LyhjRUIYBNcij4mXnC6foSVjyHlsIZ4uDecJweJwA2v6w HYBFustVsWp4pKHvi/crwO1y6x6LpjL50548zXynQ1wjRLgDGgxd7ioB7jaA0v5puusL/y m0o5oXF8CpSfL8wSVE0Ia9IgBXG56w6j7zxn9cg0qjFqyXAek2UAB99c3QY5igT0XFRocj kGRXXhFQeULYLgNLsMiUdRY2T8kymj7ERjdelSWisuYVrHvsEmRLqqkNZPDVEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E36AF1AA13 X-Spam-Score: 2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: Gu24H9O5C6of * 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