@@ -6,113 +6,14 @@ concurrency:
6
6
7
7
name : Pull request
8
8
' on ' :
9
- pull_request :
9
+ push :
10
10
jobs :
11
11
# Detect which files have changed and use this to run jobs conditionally.
12
12
# Note that we can't use the workflow-level paths attribute since this
13
13
# would skip the workflow entirely, and would prevent us from making the
14
14
# aio jobs required to pass (a skip counts as a pass).
15
- check-changes :
16
- runs-on : ubuntu-24.04
17
- permissions :
18
- pull-requests : read
19
- name : Check changed files
20
- if : github.repository == 'stackhpc/stackhpc-kayobe-config'
21
- needs :
22
- - lint
23
- # - tox
24
- outputs :
25
- aio : ${{ steps.changes.outputs.aio }}
26
- build-kayobe-image : ${{ steps.changes.outputs.build-kayobe-image }}
27
- check-tags : ${{ steps.changes.outputs.check-tags }}
28
- steps :
29
- - name : GitHub Checkout
30
- uses : actions/checkout@v4
31
-
32
- - name : Check changed files
33
- uses : dorny/paths-filter@v3
34
- id : changes
35
- with :
36
- # Filters are defined in this file.
37
- filters : .github/path-filters.yml
38
-
39
- tox :
40
- runs-on : ubuntu-24.04
41
- permissions : {}
42
- strategy :
43
- matrix :
44
- include :
45
- - environment : pep8
46
- python-version : " 3.12"
47
- - environment : releasenotes
48
- python-version : " 3.12"
49
- - environment : docs
50
- python-version : " 3.12"
51
- name : Tox ${{ matrix.environment }} with Python ${{ matrix.python-version }}
52
- if : github.repository == 'stackhpc/stackhpc-kayobe-config'
53
- steps :
54
- - name : GitHub Checkout 🛎
55
- uses : actions/checkout@v4
56
- with :
57
- fetch-depth : 0
58
- - name : Setup Python ${{ matrix.python-version }} 🐍
59
- uses : actions/setup-python@v5
60
- with :
61
- python-version : ${{ matrix.python-version }}
62
- - name : Install Tox 📦
63
- run : pip install tox
64
- - name : Run Tox ${{ matrix.environment }} 🧪
65
- run : tox -e ${{ matrix.environment }}
66
-
67
- lint :
68
- runs-on : ubuntu-24.04
69
- permissions : {}
70
- strategy :
71
- fail-fast : false
72
- matrix :
73
- include :
74
- # NOTE(upgrade): Keep these in sync with Kayobe's supported Ansible and Python versions (see release notes).
75
- - ansible : " 2.18"
76
- python : " 3.12"
77
- - ansible : " 2.17"
78
- python : " 3.10"
79
- name : Ansible ${{ matrix.ansible }} lint with Python ${{ matrix.python }}
80
- if : github.repository == 'stackhpc/stackhpc-kayobe-config'
81
- steps :
82
- - name : GitHub Checkout 🛎
83
- uses : actions/checkout@v4
84
-
85
- - name : Setup Python ${{ matrix.python-version }} 🐍
86
- uses : actions/setup-python@v4
87
- with :
88
- python-version : ${{ matrix.python }}
89
-
90
- - name : Install dependencies 📦
91
- run : |
92
- python -m pip install --upgrade pip
93
- pip install ansible-core==${{ matrix.ansible }}.* ansible-lint -r requirements.txt
94
-
95
- - name : Install Ansible Galaxy collections and roles
96
- run : |
97
- ansible-galaxy collection install -r etc/kayobe/ansible/requirements.yml
98
- ansible-galaxy role install -r etc/kayobe/ansible/requirements.yml
99
-
100
- - name : Linting code 🧪
101
- run : |
102
- ansible-lint -v --force-color etc/kayobe/ansible/.
103
-
104
- # A skipped job is treated as success when used as a required status check.
105
- # The registered required status checks refer to the name of the job in the
106
- # called reusable workflow rather than the jobs in this file. The following
107
- # jobs need to run unconditionally to allow GitHub required status checks to
108
- # pass even when there are changed files. The `! failure()` condition runs
109
- # when the parent jobs completed successfully or were skipped. We pass an
110
- # 'if' argument to the called workflow to allow running it conditionally.
111
-
112
15
build-kayobe-image :
113
16
name : Build Kayobe Image
114
- needs :
115
- - check-changes
116
17
uses : ./.github/workflows/stackhpc-build-kayobe-image.yml
117
18
with :
118
19
if : ${{ needs.check-changes.outputs.build-kayobe-image == 'true' }}
121
22
check-tags :
122
23
name : Check container image tags
123
24
needs :
124
- - check-changes
125
25
- build-kayobe-image
126
26
uses : ./.github/workflows/stackhpc-check-tags.yml
127
27
with :
@@ -130,81 +30,9 @@ jobs:
130
30
secrets : inherit
131
31
if : ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
132
32
133
- all-in-one-ubuntu-noble-ovn :
134
- name : aio (Ubuntu Noble OVN)
135
- needs :
136
- - check-changes
137
- - build-kayobe-image
138
- uses : ./.github/workflows/stackhpc-all-in-one.yml
139
- with :
140
- kayobe_image : ${{ needs.build-kayobe-image.outputs.kayobe_image }}
141
- os_distribution : ubuntu
142
- os_release : noble
143
- ssh_username : ubuntu
144
- neutron_plugin : ovn
145
- OS_CLOUD : openstack
146
- if : ${{ needs.check-changes.outputs.aio == 'true' }}
147
- secrets : inherit
148
- if : ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
149
-
150
- all-in-one-rocky-9-ovs :
151
- name : aio (Rocky 9 OVS)
152
- needs :
153
- - check-changes
154
- - build-kayobe-image
155
- uses : ./.github/workflows/stackhpc-all-in-one.yml
156
- with :
157
- kayobe_image : ${{ needs.build-kayobe-image.outputs.kayobe_image }}
158
- os_distribution : rocky
159
- os_release : " 9"
160
- ssh_username : cloud-user
161
- neutron_plugin : ovs
162
- OS_CLOUD : openstack
163
- if : ${{ needs.check-changes.outputs.aio == 'true' }}
164
- secrets : inherit
165
- if : ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
166
-
167
- all-in-one-rocky-9-ovn :
168
- name : aio (Rocky 9 OVN)
169
- needs :
170
- - check-changes
171
- - build-kayobe-image
172
- uses : ./.github/workflows/stackhpc-all-in-one.yml
173
- with :
174
- kayobe_image : ${{ needs.build-kayobe-image.outputs.kayobe_image }}
175
- os_distribution : rocky
176
- os_release : " 9"
177
- ssh_username : cloud-user
178
- neutron_plugin : ovn
179
- OS_CLOUD : openstack
180
- if : ${{ needs.check-changes.outputs.aio == 'true' }}
181
- secrets : inherit
182
- if : ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
183
-
184
- # Test two upgrade scenarios: Ubuntu Jammy to Noble OVN and Rocky 9 OVN.
185
-
186
- all-in-one-upgrade-ubuntu-jammy-to-noble-ovn :
187
- name : aio upgrade (Ubuntu Jammy to Noble OVN)
188
- needs :
189
- - check-changes
190
- - build-kayobe-image
191
- uses : ./.github/workflows/stackhpc-all-in-one.yml
192
- with :
193
- kayobe_image : ${{ needs.build-kayobe-image.outputs.kayobe_image }}
194
- os_distribution : ubuntu
195
- os_release : jammy
196
- ssh_username : ubuntu
197
- neutron_plugin : ovn
198
- OS_CLOUD : openstack
199
- if : ${{ needs.check-changes.outputs.aio == 'true' }}
200
- upgrade : true
201
- secrets : inherit
202
- if : ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
203
-
204
33
all-in-one-upgrade-rocky-9-ovn :
205
34
name : aio upgrade (Rocky 9 OVN)
206
35
needs :
207
- - check-changes
208
36
- build-kayobe-image
209
37
uses : ./.github/workflows/stackhpc-all-in-one.yml
210
38
with :
@@ -214,15 +42,13 @@ jobs:
214
42
ssh_username : cloud-user
215
43
neutron_plugin : ovn
216
44
OS_CLOUD : openstack
217
- if : ${{ needs.check-changes.outputs.aio == 'true' }}
218
45
upgrade : true
219
46
secrets : inherit
220
47
if : ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
221
48
222
49
all-in-one-upgrade-rocky-9-ovs :
223
50
name : aio upgrade (Rocky 9 OVS)
224
51
needs :
225
- - check-changes
226
52
- build-kayobe-image
227
53
uses : ./.github/workflows/stackhpc-all-in-one.yml
228
54
with :
232
58
ssh_username : cloud-user
233
59
neutron_plugin : ovs
234
60
OS_CLOUD : openstack
235
- if : ${{ needs.check-changes.outputs.aio == 'true' }}
236
61
upgrade : true
237
62
secrets : inherit
238
63
if : ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
0 commit comments