[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: hydra: bayfront: Configure the coordinator submit outputs hook.
From: |
Christopher Baines |
Subject: |
02/04: hydra: bayfront: Configure the coordinator submit outputs hook. |
Date: |
Mon, 7 Jun 2021 09:55:18 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository maintenance.
commit 34dc87b009fa4e8853b40ebc6da32376bd25fce4
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Jun 7 14:32:18 2021 +0100
hydra: bayfront: Configure the coordinator submit outputs hook.
This is used when deciding whether the outputs from a build should be
submitted.
* hydra/bayfront.scm (%guix-build-coordinator-configuration)[hooks]:
Specify a build-submit-outputs-hook.
---
hydra/bayfront.scm | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index fef4c47..53f11d5 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -701,7 +701,25 @@ access_log /var/log/nginx/bordeaux.access.log;"))
'build-canceled-send-event-to-guix-data-service-hook)
(apply (@ (guix-build-coordinator hooks)
default-build-canceled-hook)
- args))))))))
+ args)))
+ (build-submit-outputs
+ . ,#~(begin
+ (use-modules (srfi srfi-1)
+ (guix-build-coordinator coordinator)
+ (guix-build-coordinator datastore))
+
+ (lambda (build-coordinator uuid)
+ (any (lambda (output)
+ (let* ((output-hash
+ (string-take
+ (string-drop (assq-ref output 'output) 11)
+ 32))
+ (narinfo
+ (string-append #$publish-directory "/"
+ output-hash ".narinfo")))
+ (not (file-exists? narinfo))))
+ (datastore-list-build-outputs
+ (build-coordinator-datastore build-coordinator)
uuid))))))))))
(operating-system
(host-name "bayfront")