unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 56f487647d7cb3f0cca86a2c9a28008710f01baa 3017 bytes (raw)
name: src/cuirass/forges.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 
;;; forges.scm -- Common forges utilities
;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
;;;
;;; This file is part of Cuirass.
;;;
;;; Cuirass is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; Cuirass is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Cuirass.  If not, see <http://www.gnu.org/licenses/>.

(define-module (cuirass forges)
  #:use-module (cuirass specification)
  #:use-module (json)
  #:use-module (ice-9 match)
  #:export (%default-jobset-options-period
            %default-jobset-options-priority
            %default-jobset-options-systems

            make-jobset-options
            jobset-options?
            json->jobset-options
            jobset-options-name-prefix
            jobset-options-build
            jobset-options-period
            jobset-options-priority
            jobset-options-systems))

;;; Commentary:
;;;
;;; This module implements objects and default values used in the various
;;; forges modules.
;;;
;;; Code:

;; Default polling period for jobsets created using a forge module.
(define %default-jobset-options-period 3600)

;; Default priority for jobsets created using a forge module.
(define %default-jobset-options-priority 5)

;; Default target systems for jobsets created using a forge module.
(define %default-jobset-options-systems
  (list "x86_64-linux"))

;; This mapping defines a specific JSON dictionary used for tweaking Cuirass
;; options. It is not included in the JSON data sent by default by Gitlab and
;; must be used through the custom template mechanism (see documentation).
(define-json-mapping <jobset-options>
  make-jobset-options
  jobset-options?
  json->jobset-options
  (name-prefix jobset-options-name-prefix "name_prefix"
               (lambda (v)
                 (if (unspecified? v)
                     #f
                     (string->symbol v))))
  (build jobset-options-build "build"
         (match-lambda
           ((? unspecified?)
            #f)
           (((key . val) _ ...)
            (cons (string->symbol key) (vector->list val)))
           (str
            (string->symbol str))))
  (period jobset-options-period "period"
          (lambda (v)
            (if (unspecified? v)
                #f
                v)))
  (priority jobset-options-priority "priority"
            (lambda (v)
              (if (unspecified? v)
                  #f
                  v)))
  (systems jobset-options-systems "systems"
           (lambda (v)
             (if (unspecified? v)
                 #f
                 (vector->list v)))))

debug log:

solving 56f4876 ...
found 56f4876 in https://yhetil.org/guix-patches/20241212155845.27344-4-romain.garbage@inria.fr/
found c05e266 in https://yhetil.org/guix-patches/20241212155845.27344-3-romain.garbage@inria.fr/

applying [1/2] https://yhetil.org/guix-patches/20241212155845.27344-3-romain.garbage@inria.fr/
diff --git a/src/cuirass/forges.scm b/src/cuirass/forges.scm
new file mode 100644
index 0000000..c05e266


applying [2/2] https://yhetil.org/guix-patches/20241212155845.27344-4-romain.garbage@inria.fr/
diff --git a/src/cuirass/forges.scm b/src/cuirass/forges.scm
index c05e266..56f4876 100644

Checking patch src/cuirass/forges.scm...
Applied patch src/cuirass/forges.scm cleanly.
Checking patch src/cuirass/forges.scm...
Applied patch src/cuirass/forges.scm cleanly.

index at:
100644 56f487647d7cb3f0cca86a2c9a28008710f01baa	src/cuirass/forges.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).