guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: hydra: services: Support selecting Cuirass specifications.


From: Christopher Baines
Subject: 01/02: hydra: services: Support selecting Cuirass specifications.
Date: Thu, 28 May 2020 15:49:38 -0400 (EDT)

cbaines pushed a commit to branch master
in repository maintenance.

commit 9a202eabe25e4a5c57c3072f82d541d13c200ea2
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Tue May 26 09:59:59 2020 +0100

    hydra: services: Support selecting Cuirass specifications.
    
    Support selecting specifications by branch, so that Bayfront can be
    configured only to build master.
    
    * hydra/modules/sysadmin/services.scm (cuirass-specs): Support
    selecting specifications by branch.
    (frontend-services): Add a #:branches parameter, and pass this to
    cuirass-specs.
---
 hydra/modules/sysadmin/services.scm | 80 ++++++++++++++++++++-----------------
 1 file changed, 44 insertions(+), 36 deletions(-)

diff --git a/hydra/modules/sysadmin/services.scm 
b/hydra/modules/sysadmin/services.scm
index 81649fc..fe989d3 100644
--- a/hydra/modules/sysadmin/services.scm
+++ b/hydra/modules/sysadmin/services.scm
@@ -207,42 +207,49 @@
     (#:branch . ,branch)
     (#:no-compile? . #t)))
 
-(define (cuirass-specs systems)
+(define (cuirass-specs branches systems)
   "Return the Cuirass specifications to build Guix for the given SYSTEMS."
-  #~(list `((#:name . "guix-master")
-            (#:load-path-inputs . ())
-            (#:package-path-inputs . ())
-            (#:proc-input . "guix")
-            (#:proc-file . "build-aux/cuirass/gnu-system.scm")
-            (#:proc . cuirass-jobs)
-            (#:proc-args (subset . "all") (systems #$@systems))
-            (#:inputs . (#$(guix-input "guix" "master"))))
-          `((#:name . "guix-modular-master")
-            ;; Keep the load path empty: it uses the available Guix modules
-            ;; to build a trampoline.
-            (#:load-path-inputs . ())
-            (#:package-path-inputs . ())
-            (#:proc-input . "guix-modular")
-            (#:proc-file . "build-aux/cuirass/guix-modular.scm")
-            (#:proc . cuirass-jobs)
-            (#:proc-args (systems #$@systems))
-            (#:inputs . (#$(guix-input "guix-modular" "master"))))
-          `((#:name . "staging-staging")
-            (#:load-path-inputs . ())
-            (#:package-path-inputs . ())
-            (#:proc-input . "staging")
-            (#:proc-file . "build-aux/cuirass/gnu-system.scm")
-            (#:proc . cuirass-jobs)
-            (#:proc-args (systems #$@systems))
-            (#:inputs . (#$(guix-input "staging" "staging"))))
-          `((#:name . "core-updates-core-updates")
-            (#:load-path-inputs . ())
-            (#:package-path-inputs . ())
-            (#:proc-input . "core-updates")
-            (#:proc-file . "build-aux/cuirass/gnu-system.scm")
-            (#:proc . cuirass-jobs)
-            (#:proc-args (subset . core) (systems #$@systems))
-            (#:inputs . (#$(guix-input "core-updates" "core-updates"))))))
+  #~(list
+     #$@(if (member "master" branches)
+            #~(`((#:name . "guix-master")
+                 (#:load-path-inputs . ())
+                 (#:package-path-inputs . ())
+                 (#:proc-input . "guix")
+                 (#:proc-file . "build-aux/cuirass/gnu-system.scm")
+                 (#:proc . cuirass-jobs)
+                 (#:proc-args (subset . "all") (systems #$@systems))
+                 (#:inputs . (#$(guix-input "guix" "master"))))
+               `((#:name . "guix-modular-master")
+                 ;; Keep the load path empty: it uses the available Guix 
modules
+                 ;; to build a trampoline.
+                 (#:load-path-inputs . ())
+                 (#:package-path-inputs . ())
+                 (#:proc-input . "guix-modular")
+                 (#:proc-file . "build-aux/cuirass/guix-modular.scm")
+                 (#:proc . cuirass-jobs)
+                 (#:proc-args (systems #$@systems))
+                 (#:inputs . (#$(guix-input "guix-modular" "master"))))
+               #~()))
+     #$@(if (member "staging" branches)
+            #~(`((#:name . "staging-staging")
+                 (#:load-path-inputs . ())
+                 (#:package-path-inputs . ())
+                 (#:proc-input . "staging")
+                 (#:proc-file . "build-aux/cuirass/gnu-system.scm")
+                 (#:proc . cuirass-jobs)
+                 (#:proc-args (systems #$@systems))
+                 (#:inputs . (#$(guix-input "staging" "staging")))))
+            #~())
+     #$@(if (member "core-updates" branches)
+            #~(`((#:name . "core-updates-core-updates")
+                 (#:load-path-inputs . ())
+                 (#:package-path-inputs . ())
+                 (#:proc-input . "core-updates")
+                 (#:proc-file . "build-aux/cuirass/gnu-system.scm")
+                 (#:proc . cuirass-jobs)
+                 (#:proc-args (subset . core) (systems #$@systems))
+                 (#:inputs . (#$(guix-input "core-updates" "core-updates")))))
+            #~())))
 
 
 ;;;
@@ -356,6 +363,7 @@
                             (max-jobs 5)
                             (cores 4)
                             (build-accounts-to-max-jobs-ratio 4)
+                            (branches '("master" "staging" "core-updates"))
                             (systems '("x86_64-linux" "i686-linux"))
                             (motd %default-motd)
                             (nar-ttl (* 90 24 3600))
@@ -385,7 +393,7 @@
                    (cuirass cuirass-without-fiber-tests)
                    (interval (* 5 60))
                    (ttl (quotient nar-ttl 2))
-                   (specifications (cuirass-specs systems))))
+                   (specifications (cuirass-specs branches systems))))
 
          (service openssh-service-type)
          (service sysadmin-service-type sysadmins)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]