aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-05-27 14:23:59 +0100
committerChristopher Baines <mail@cbaines.net>2022-05-27 14:23:59 +0100
commit7c3d334eaaa002a60f1fdfea475a733d9ee221fa (patch)
tree0b736c5a185d02f0d46d196ecc2df41b301755d2 /scripts
parent7914e998a4da0c211f9d7bd03e5141f070e120d3 (diff)
downloadbuild-coordinator-7c3d334eaaa002a60f1fdfea475a733d9ee221fa.tar
build-coordinator-7c3d334eaaa002a60f1fdfea475a733d9ee221fa.tar.gz
Support specifying branches to submit builds for
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in b/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
index 01c301f..dc28008 100644
--- a/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
+++ b/scripts/guix-build-coordinator-queue-builds-from-guix-data-service.in
@@ -285,6 +285,13 @@
arg
(alist-delete 'guix-data-service-build-server-id
result))))
+ (option '("branch") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'branches
+ (cons arg
+ (or (assq-ref result 'branches)
+ '()))
+ (alist-delete 'branches result))))
(option '("threads") #t #f
(lambda (opt name arg result)
(alist-cons 'threads
@@ -426,8 +433,12 @@
repository-id
branch)
(map car (list-jobs)))))
- (all-repository-branches guix-data-service
- repository-id)))
+ (let ((all-branches (all-repository-branches guix-data-service
+ repository-id))
+ (specified-branches
+ (assq-ref opts 'branches)))
+ (or specified-branches
+ all-branches))))
(all-repository-ids guix-data-service))
(log-msg 'INFO "jobs: " (count-jobs) " threads: " (count-threads))