mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 14:56:54 +01:00
ci: Add "evaluation" method.
* guix/ci.scm (evaluation): New procedure.
This commit is contained in:
parent
9087af0323
commit
1d229a34b7
1 changed files with 8 additions and 0 deletions
|
@ -50,6 +50,7 @@ (define-module (guix ci)
|
||||||
%query-limit
|
%query-limit
|
||||||
queued-builds
|
queued-builds
|
||||||
latest-builds
|
latest-builds
|
||||||
|
evaluation
|
||||||
latest-evaluations
|
latest-evaluations
|
||||||
evaluations-for-commit))
|
evaluations-for-commit))
|
||||||
|
|
||||||
|
@ -140,6 +141,13 @@ (define* (option name value #:optional (->string identity))
|
||||||
;; 'latestbuilds', but Cuirass does.
|
;; 'latestbuilds', but Cuirass does.
|
||||||
(map json->build (vector->list latest))))
|
(map json->build (vector->list latest))))
|
||||||
|
|
||||||
|
(define (evaluation url evaluation)
|
||||||
|
"Return the given EVALUATION performed by the CI server at URL."
|
||||||
|
(let ((evaluation (json-fetch
|
||||||
|
(string-append url "/api/evaluation?id="
|
||||||
|
(number->string evaluation)))))
|
||||||
|
(json->evaluation evaluation)))
|
||||||
|
|
||||||
(define* (latest-evaluations url #:optional (limit %query-limit))
|
(define* (latest-evaluations url #:optional (limit %query-limit))
|
||||||
"Return the latest evaluations performed by the CI server at URL."
|
"Return the latest evaluations performed by the CI server at URL."
|
||||||
(map json->evaluation
|
(map json->evaluation
|
||||||
|
|
Loading…
Reference in a new issue