ci: Add build products support.

* guix/ci.scm (<build-product>): New json mapping,
(<build)[products]: new field.
This commit is contained in:
Mathieu Othacehe 2020-06-14 21:53:57 +02:00
parent b64ca5dadc
commit 4e05bbb093
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -52,13 +52,27 @@ (define-module (guix ci)
;;;
;;; 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