@@ -7,24 +7,43 @@ name: CI
77 - master
88
99jobs :
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+
1037 molecule :
1138 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
2241 strategy :
2342 fail-fast : false
2443 matrix :
2544 image :
2645 - ' rockylinux:8.9'
27- - ' rockylinux:9.3 '
46+ - ' localhost/rocky93systemd '
2847 scenario :
2948 - test1
3049 - test1b
@@ -42,13 +61,24 @@ jobs:
4261 - test12
4362 - test13
4463 - test14
45-
4664 exclude : []
4765
4866 steps :
4967 - name : Check out the codebase.
5068 uses : actions/checkout@v4
5169
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+
5282 - name : Set up Python 3.
5383 uses : actions/setup-python@v4
5484 with :
0 commit comments