aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-25 15:37:55 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-25 15:37:55 +0100
commitbcf5fe50e60add30d1fd59ca98b8de81ad9aab18 (patch)
tree9dbd83694c04e1b1a68cee4372759cd895bf0018 /guix-build-coordinator
parent000664f467ad6aa734965ab72a739b641198c5de (diff)
downloadbuild-coordinator-bcf5fe50e60add30d1fd59ca98b8de81ad9aab18.tar
build-coordinator-bcf5fe50e60add30d1fd59ca98b8de81ad9aab18.tar.gz
Restructure the post build actions
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/agent.scm23
1 files changed, 14 insertions, 9 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm
index ec4860d..ac89db6 100644
--- a/guix-build-coordinator/agent.scm
+++ b/guix-build-coordinator/agent.scm
@@ -47,13 +47,12 @@
(let ((pre-build-status (pre-build-process derivation-name)))
(if (eq? (assq-ref pre-build-status 'result) 'success)
(let ((result (perform-build derivation-name)))
- (if result
- (post-build uuid coordinator-uri password
- (assoc-ref build "uuid")
- derivation-name)
- (submit-build-result coordinator-uri uuid password
- (assoc-ref build "uuid")
- '((result . failure)))))
+ ((if result
+ post-build-success
+ post-build-failure)
+ uuid coordinator-uri password
+ (assoc-ref build "uuid")
+ derivation-name))
(begin
(simple-format #t "failure: ~A\n" pre-build-status)
(report-setup-failure coordinator-uri uuid password
@@ -144,8 +143,14 @@
#f))))
-(define (post-build uuid coordinator-uri password
- build-id derivation)
+(define (post-build-failure uuid coordinator-uri password
+ build-id derivation)
+ (submit-build-result coordinator-uri uuid password
+ build-id
+ '((result . failure))))
+
+(define (post-build-success uuid coordinator-uri password
+ build-id derivation)
(let ((output-details
(map
(match-lambda