From 3db603c1913fe14d260a44b05575a2ead3866b47 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 14 Jun 2020 18:45:38 +0200 Subject: [PATCH] http: Add build products support to the API. * src/cuirass/http.scm (build->hydra-build)[build-products]: New variable, added to "buildproducts" field. * tests/http.scm (build-query-result): Adapt accordingly. --- src/cuirass/http.scm | 5 ++++- tests/http.scm | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm index 0b2f056..4da36bc 100644 --- a/src/cuirass/http.scm +++ b/src/cuirass/http.scm @@ -84,6 +84,9 @@ (list (build-status scheduled) (build-status started))))) + (define build-products + (db-get-build-products (assq-ref build #:id))) + `((#:id . ,(assq-ref build #:id)) (#:jobset . ,(assq-ref build #:specification)) (#:job . ,(assq-ref build #:job-name)) @@ -105,7 +108,7 @@ (assq-ref build #:status)))) (#:priority . 0) (#:finished . ,(bool->int finished?)) - (#:buildproducts . #nil) + (#:buildproducts . ,(list->vector build-products)) (#:releasename . #nil) (#:buildinputs_builds . #nil))) diff --git a/tests/http.scm b/tests/http.scm index d69c25c..19db037 100644 --- a/tests/http.scm +++ b/tests/http.scm @@ -71,7 +71,7 @@ (#:busy . 0) (#:priority . 0) (#:finished . 1) - (#:buildproducts . #nil) + (#:buildproducts . #()) (#:releasename . #nil) (#:buildinputs_builds . #nil)))