me
/
guix
Archived
1
0
Fork 0

ci: Fix the images specification.

If the current-guix-package parameter is not set, Cuirass will try to update
the in-store Git checkout used by the evaluate.scm inferior:

ice-9/boot-9.scm:1685:16: In procedure raise-exception: ERROR:
1. &inferior-exception: arguments: (git-error #<inferior-object #<<git-error>
code: -3 message: "could not find repository from
'/gnu/store/v33m82qzkvd96dlp2g83dvz62n4pkad2-guix-20d8081'" class: 6>>)
inferior: #<inferior pipe (0 1 1) 7f7948957dc0>
stack: ((#f ("ice-9/boot-9.scm" 1779 13)) (raise-exception ("ice-9/boot-9.scm"
1682 16)) (raise-exception ("ice-9/boot-9.scm" 1684 16)) (#f ("guix/git.scm"
395 13))

This is a follow-up of: 5bce4c8242.

* gnu/ci.scm (image-jobs): Add source and commit arguments.
Use them to set the current-guix-package parameter.
(cuirass-jobs): Adapt accordingly.
Mathieu Othacehe 2022-08-17 11:22:22 +02:00
parent a944fd6c4e
commit 5bbb9af5d9
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 33 additions and 28 deletions

View File

@ -254,37 +254,40 @@ otherwise use the IMAGE name."
(parameterize ((%graft? #f)) (parameterize ((%graft? #f))
(derivation->job name drv)))) (derivation->job name drv))))
(define (image-jobs store system) (define* (image-jobs store system
#:key source commit)
"Return a list of jobs that build images for SYSTEM." "Return a list of jobs that build images for SYSTEM."
(define MiB (define MiB
(expt 2 20)) (expt 2 20))
(if (member system %guix-system-supported-systems) (parameterize ((current-guix-package
`(,(image->job store (channel-source->package source #:commit commit)))
(image (if (member system %guix-system-supported-systems)
(inherit efi-disk-image) `(,(image->job store
(operating-system installation-os)) (image
#:name "usb-image" (inherit efi-disk-image)
#:system system) (operating-system installation-os))
,(image->job #:name "usb-image"
store #:system system)
(image ,(image->job
(inherit (image-with-label store
iso9660-image (image
(string-append "GUIX_" system "_" (inherit (image-with-label
(if (> (string-length %guix-version) 7) iso9660-image
(substring %guix-version 0 7) (string-append "GUIX_" system "_"
%guix-version)))) (if (> (string-length %guix-version) 7)
(operating-system installation-os)) (substring %guix-version 0 7)
#:name "iso9660-image" %guix-version))))
#:system system) (operating-system installation-os))
;; Only cross-compile Guix System images from x86_64-linux for now. #:name "iso9660-image"
,@(if (string=? system "x86_64-linux") #:system system)
(map (cut image->job store <> ;; Only cross-compile Guix System images from x86_64-linux for now.
#:system system) ,@(if (string=? system "x86_64-linux")
%guix-system-images) (map (cut image->job store <>
'())) #:system system)
'())) %guix-system-images)
'()))
'())))
(define* (system-test-jobs store system (define* (system-test-jobs store system
#:key source commit) #:key source commit)
@ -527,7 +530,9 @@ names."
hello system)))) hello system))))
('images ('images
;; Build Guix System images only. ;; Build Guix System images only.
(image-jobs store system)) (image-jobs store system
#:source source
#:commit commit))
('system-tests ('system-tests
;; Build Guix System tests only. ;; Build Guix System tests only.
(system-test-jobs store system (system-test-jobs store system