me
/
guix
Archived
1
0
Fork 0

guix: ci: Add spec support to latest-evaluations.

* guix/ci.scm (latest-evaluations): Add spec parameter support.
master
Mathieu Othacehe 2021-05-26 14:54:43 +02:00
parent a2155f41f5
commit 316d9e0817
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 15 additions and 8 deletions

View File

@ -154,14 +154,21 @@ string such as \"x86_64-linux\"), restrict to builds for SYSTEM."
(number->string evaluation)))))
(json->evaluation evaluation)))
(define* (latest-evaluations url #:optional (limit %query-limit))
"Return the latest evaluations performed by the CI server at URL."
(map json->evaluation
(vector->list
(json->scm
(http-fetch (string-append url "/api/evaluations?nr="
(number->string limit)))))))
(define* (latest-evaluations url
#:optional (limit %query-limit)
#:key spec)
"Return the latest evaluations performed by the CI server at URL. If SPEC
is passed, only consider the evaluations for the given SPEC specification."
(let ((spec (if spec
(format #f "&spec=~a" spec)
"")))
(map json->evaluation
(vector->list
(json->scm
(http-fetch
(string-append url "/api/evaluations?nr="
(number->string limit)
spec)))))))
(define* (evaluations-for-commit url commit #:optional (limit %query-limit))
"Return the evaluations among the latest LIMIT evaluations that have COMMIT