diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-16 20:48:47 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-16 20:48:47 +0100 |
commit | e3537c56e417d7a4dca5f77a062c066fe2d2391c (patch) | |
tree | 6aa04caaf70d0005d3d01ab44cc48fd2fbfea839 /scripts | |
parent | e1cee556a9b20ab1f37869cd72b89cef0e9bae07 (diff) | |
download | qa-frontpage-e3537c56e417d7a4dca5f77a062c066fe2d2391c.tar qa-frontpage-e3537c56e417d7a4dca5f77a062c066fe2d2391c.tar.gz |
Support submitting branch builds manually
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-qa-frontpage.in | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/scripts/guix-qa-frontpage.in b/scripts/guix-qa-frontpage.in index 471df6f..96028f1 100644 --- a/scripts/guix-qa-frontpage.in +++ b/scripts/guix-qa-frontpage.in @@ -110,7 +110,16 @@ (lambda (opt name arg result) (alist-cons 'priority (string->number arg) - result))))) + result))) + (option '("system") #t #f + (lambda (opt name arg result) + (alist-cons 'systems + (cons arg + (or (assq-ref result + 'systems) + '())) + (alist-delete 'systems + result)))))) (define %submit-build-default-options `((database . ,(string-append (getcwd) @@ -158,6 +167,32 @@ 550 350))))))) + (("submit-branch-builds" branch-name rest ...) + (parameterize + ((%git-repository-location (string-append (getcwd) "/guix.git"))) + (let* ((opts (parse-options + %submit-build-options + %submit-build-default-options + rest)) + (metrics-registry (make-metrics-registry + #:namespace + "guixqafrontpage")) + (database + (setup-database (assq-ref opts 'database) + metrics-registry))) + + (submit-builds-for-branch + database + "http://127.0.0.1:8746" + "https://data.qa.guix.gnu.org" + branch-name + #:priority + (or (const (assq-ref opts 'priority)) + default-branch-priority-for-change) + #:systems + (or (assq-ref opts 'systems) + %systems-to-submit-builds-for))))) + ((args ...) (let ((opts (parse-options %options |