[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: ci: Add build products support.
From: |
guix-commits |
Subject: |
01/02: ci: Add build products support. |
Date: |
Mon, 15 Jun 2020 03:15:28 -0400 (EDT) |
mothacehe pushed a commit to branch master
in repository guix.
commit 4e05bbb093a17145fcabd48ea1d2c9cd7559084d
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sun Jun 14 21:53:57 2020 +0200
ci: Add build products support.
* guix/ci.scm (<build-product>): New json mapping,
(<build)[products]: new field.
---
guix/ci.scm | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/guix/ci.scm b/guix/ci.scm
index 8fd0566..e1016ef 100644
--- a/guix/ci.scm
+++ b/guix/ci.scm
@@ -52,13 +52,27 @@
;;;
;;; Code:
+(define-json-mapping <build-product> make-build-product
+ build-product?
+ json->build-product
+ (type build-product-type)
+ (file-size build-product-file-size)
+ (path build-product-path))
+
(define-json-mapping <build> make-build build?
json->build
(id build-id "id") ;integer
(derivation build-derivation) ;string | #f
(system build-system) ;string
(status build-status "buildstatus" ) ;integer
- (timestamp build-timestamp)) ;integer
+ (timestamp build-timestamp) ;integer
+ (products build-products "buildproducts" ;<build-product>*
+ (lambda (products)
+ (map json->build-product
+ ;; Before Cuirass 3db603c1, #f is always returned.
+ (if products
+ (vector->list products)
+ '())))))
(define-json-mapping <checkout> make-checkout checkout?
json->checkout