@@ -7,6 +7,33 @@ 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
39
# Workaround: systemd/kernel compatibility issue:
@@ -18,37 +45,49 @@ jobs:
18
45
# See:
19
46
# - https://bugzilla.redhat.com/show_bug.cgi?id=190144
20
47
# - https://github.com/systemd/systemd/pull/16424
21
- runs-on : ubuntu-20.04
48
+ runs-on : ubuntu-22.04
49
+ needs : build
22
50
strategy :
23
51
fail-fast : false
24
52
matrix :
25
53
image :
26
54
- ' rockylinux:8.9'
27
- - ' rockylinux:9.3 '
55
+ - ' localhost/rocky93systemd '
28
56
scenario :
29
- - test1
30
- - test1b
31
- - test1c
32
- - test2
33
- - test3
57
+ # - test1
58
+ # - test1b
59
+ # - test1c
60
+ # - test2
61
+ # - test3
34
62
- test4
35
- - test5
36
- - test6
37
- - test7
38
- - test8
39
- - test9
40
- - test10
41
- - test11
42
- - test12
43
- - test13
44
- - test14
45
-
63
+ # - test5
64
+ # - test6
65
+ # - test7
66
+ # - test8
67
+ # - test9
68
+ # - test10
69
+ # - test11
70
+ # - test12
71
+ # - test13
72
+ # - test14
46
73
exclude : []
47
74
48
75
steps :
49
76
- name : Check out the codebase.
50
77
uses : actions/checkout@v4
51
78
79
+ - name : Download rocky9 container image
80
+ uses : actions/download-artifact@v4
81
+ with :
82
+ name : rocky93systemd
83
+ path : molecule/images/rocky93systemd.docker
84
+ if : matrix.image == 'localhost/rocky93systemd'
85
+
86
+ - name : Load rocky9 container image
87
+ run : podman load --input rocky93systemd.docker/rocky93systemd.docker
88
+ working-directory : molecule/images
89
+ if : matrix.image == 'localhost/rocky93systemd'
90
+
52
91
- name : Set up Python 3.
53
92
uses : actions/setup-python@v4
54
93
with :
0 commit comments