summary refs log tree commit diff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-10-12 22:12:51 +0200
committerLudovic Courtès <ludo@gnu.org>2023-10-12 22:14:34 +0200
commit5a3fb306535c2ec0a118f2f0bc8f6a162b85c7d6 (patch)
treed4c81e21e7c9543063ed969bb0d02ca7d9acdca1 /gnu/services
parentf0c929f1e672a9c77ec681f7d548c26c63ff7b83 (diff)
downloadguix-5a3fb306535c2ec0a118f2f0bc8f6a162b85c7d6.tar.gz
services: cuirass: Add ‘log-expiry’ option for ‘remote-server’.
* gnu/services/cuirass.scm (<cuirass-remote-server-configuration>)[log-expiry]:
New field.
(cuirass-shepherd-service): Honor it.
* doc/guix.texi (Continuous Integration): Document it.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/cuirass.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 71787a85e6..fcbd5e08a5 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -73,6 +73,8 @@
                     (default "/var/log/cuirass-remote-server.log"))
   (cache            cuirass-remote-server-configuration-cache ;string
                     (default "/var/cache/cuirass/remote/"))
+  (log-expiry       cuirass-remote-server-configuration-log-expiry
+                    (default (* 6 30 24 3600)))   ;6 months
   (publish?         cuirass-remote-server-configuration-publish? ;boolean
                     (default #t))
   (trigger-url      cuirass-remote-server-trigger-url ;string
@@ -194,7 +196,7 @@
         (stop #~(make-kill-destructor)))
       ,@(if remote-server
             (match-record remote-server <cuirass-remote-server-configuration>
-              (backend-port publish-port log-file cache publish?
+              (backend-port publish-port log-file log-expiry cache publish?
                             trigger-url public-key private-key)
               (list
                (shepherd-service
@@ -207,6 +209,9 @@
                                 (string-append "--database=" #$database)
                                 (string-append "--cache=" #$cache)
                                 (string-append "--user=" #$user)
+                                (string-append "--log-expiry="
+                                               #$(number->string log-expiry)
+                                               "s")
                                 #$@(if backend-port
                                        (list (string-append
                                               "--backend-port="