@@ -7,24 +7,43 @@ name: CI
7
7
- master
8
8
9
9
jobs :
10
+ build :
11
+ name : Build Rocky9 container image
12
+ # Upstream rockylinux:9.3 images don't contain systemd, which means /sbin/init fails.
13
+ # A workaround of using "/bin/bash -c 'dnf -y install systemd && /sbin/init'"
14
+ # as the container command is flaky.
15
+ # This job builds an image using the upstream rockylinux:9.3 image which ensures
16
+ # that the image used for the molecule workflow is always updated.
17
+ runs-on : ubuntu-22.04
18
+ defaults :
19
+ run :
20
+ working-directory : molecule/images
21
+ steps :
22
+ - name : Check out the codebase.
23
+ uses : actions/checkout@v4
24
+
25
+ - name : Build image
26
+ run : podman build -t rocky93systemd:latest .
27
+
28
+ - name : Save image
29
+ run : podman save --output rocky93systemd.docker rocky93systemd:latest
30
+
31
+ - name : Upload rocky9 image
32
+ uses : actions/upload-artifact@v4
33
+ with :
34
+ name : rocky93systemd
35
+ path : molecule/images/rocky93systemd.docker
36
+
10
37
molecule :
11
38
name : Molecule
12
- # Workaround: systemd/kernel compatibility issue:
13
- # Failed to parse bus message: Invalid argument
14
- # when doing `systemctl show slurmd` by switching to an older ubuntu
15
- # release (18.04 from 20.04). We can remove this when we are running a
16
- # systemd version new enough to cope with the extra capabilities that are
17
- # in newer kernel versions.
18
- # See:
19
- # - https://bugzilla.redhat.com/show_bug.cgi?id=190144
20
- # - https://github.com/systemd/systemd/pull/16424
21
- runs-on : ubuntu-20.04
39
+ runs-on : ubuntu-22.04
40
+ needs : build
22
41
strategy :
23
42
fail-fast : false
24
43
matrix :
25
44
image :
26
45
- ' rockylinux:8.9'
27
- - ' rockylinux:9.3 '
46
+ - ' localhost/rocky93systemd '
28
47
scenario :
29
48
- test1
30
49
- test1b
@@ -42,13 +61,24 @@ jobs:
42
61
- test12
43
62
- test13
44
63
- test14
45
-
46
64
exclude : []
47
65
48
66
steps :
49
67
- name : Check out the codebase.
50
68
uses : actions/checkout@v4
51
69
70
+ - name : Download rocky9 container image
71
+ uses : actions/download-artifact@v4
72
+ with :
73
+ name : rocky93systemd
74
+ path : molecule/images/rocky93systemd.docker
75
+ if : matrix.image == 'localhost/rocky93systemd'
76
+
77
+ - name : Load rocky9 container image
78
+ run : podman load --input rocky93systemd.docker/rocky93systemd.docker
79
+ working-directory : molecule/images
80
+ if : matrix.image == 'localhost/rocky93systemd'
81
+
52
82
- name : Set up Python 3.
53
83
uses : actions/setup-python@v4
54
84
with :
0 commit comments