@@ -89,13 +89,11 @@ jobs:
89
89
- name : Make sure dockerd is running and test Docker.
90
90
run : |
91
91
docker run --rm hello-world
92
-
93
92
94
93
- name : Output image tag
95
94
id : image_tag
96
95
run : |
97
96
echo image_tag=$(grep stackhpc_${{ inputs.os_distribution }}_$(sed s/-/_/ <(echo "${{ inputs.os_release }}"))_overcloud_host_image_version: etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
98
-
99
97
100
98
# Use the image override if set, otherwise use overcloud-os_distribution-os_release-tag
101
99
- name : Output image name
@@ -106,29 +104,24 @@ jobs:
106
104
else
107
105
echo image_name=${{ inputs.vm_image_override }} >> $GITHUB_OUTPUT
108
106
fi
109
-
110
107
111
108
- name : Install terraform
112
109
uses : hashicorp/setup-terraform@v2
113
-
114
110
115
111
- name : Initialise terraform
116
112
run : terraform init
117
113
working-directory : ${{ github.workspace }}/terraform/aio
118
-
119
114
120
115
- name : Generate SSH keypair
121
116
run : ssh-keygen -f id_rsa -N ''
122
117
working-directory : ${{ github.workspace }}/terraform/aio
123
-
124
118
125
119
- name : Generate clouds.yaml
126
120
run : |
127
121
cat << EOF > clouds.yaml
128
122
${{ secrets.CLOUDS_YAML }}
129
123
EOF
130
124
working-directory : ${{ github.workspace }}/terraform/aio
131
-
132
125
133
126
- name : Generate terraform.tfvars
134
127
run : |
@@ -151,7 +144,6 @@ jobs:
151
144
VM_NETWORK : ${{ inputs.vm_network }}
152
145
VM_SUBNET : ${{ inputs.vm_subnet }}
153
146
VM_INTERFACE : ${{ inputs.vm_interface }}
154
-
155
147
156
148
- name : Terraform Plan
157
149
run : terraform plan
@@ -160,7 +152,6 @@ jobs:
160
152
OS_CLOUD : ${{ inputs.OS_CLOUD }}
161
153
OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
162
154
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
163
-
164
155
165
156
- name : Terraform Apply
166
157
run : terraform apply -auto-approve
@@ -169,21 +160,18 @@ jobs:
169
160
OS_CLOUD : ${{ inputs.OS_CLOUD }}
170
161
OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
171
162
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
172
-
173
163
174
164
- name : Get Terraform outputs
175
165
id : tf_outputs
176
166
run : |
177
167
terraform output -json
178
168
working-directory : ${{ github.workspace }}/terraform/aio
179
-
180
169
181
170
- name : Write Terraform outputs
182
171
run : |
183
172
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/tf-outputs.yml
184
173
${{ steps.tf_outputs.outputs.stdout }}
185
174
EOF
186
-
187
175
188
176
- name : Write Terraform network config
189
177
run : |
@@ -198,14 +186,12 @@ jobs:
198
186
admin_ips:
199
187
controller0: "{{ access_ip_v4.value }}"
200
188
EOF
201
-
202
189
203
190
- name : Write Terraform network interface config
204
191
run : |
205
192
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/inventory/group_vars/controllers/tf-network-interfaces
206
193
admin_interface: "{{ access_interface.value }}"
207
194
EOF
208
-
209
195
210
196
- name : Write all-in-one scenario config
211
197
run : |
@@ -219,7 +205,6 @@ jobs:
219
205
ENABLE_OVN : ${{ inputs.neutron_plugin == 'ovn' }}
220
206
OS_DISTRIBUTION : ${{ inputs.os_distribution }}
221
207
OS_RELEASE : ${{ inputs.os_release }}
222
-
223
208
224
209
# Use a heredoc to define a multiline string output
225
210
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
@@ -229,13 +214,11 @@ jobs:
229
214
echo "ssh_key<<EOF" >> $GITHUB_OUTPUT
230
215
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
231
216
echo "EOF" >> $GITHUB_OUTPUT
232
-
233
217
234
218
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
235
219
- name : Pull latest Kayobe image
236
220
run : |
237
221
docker image pull $KAYOBE_IMAGE
238
-
239
222
240
223
- name : Run growroot
241
224
run : |
@@ -246,7 +229,6 @@ jobs:
246
229
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml'
247
230
env :
248
231
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
249
-
250
232
251
233
- name : Host configure
252
234
run : |
@@ -257,7 +239,6 @@ jobs:
257
239
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
258
240
env :
259
241
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
260
-
261
242
262
243
- name : Service deploy
263
244
run : |
@@ -268,7 +249,6 @@ jobs:
268
249
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-service-deploy.sh
269
250
env :
270
251
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
271
-
272
252
273
253
- name : Configure aio resources
274
254
run : |
@@ -279,8 +259,6 @@ jobs:
279
259
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml
280
260
env :
281
261
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
282
-
283
-
284
262
285
263
- name : Tempest tests
286
264
run : |
@@ -293,7 +271,6 @@ jobs:
293
271
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/tempest.sh -e ansible_user=stack
294
272
env :
295
273
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
296
-
297
274
298
275
- name : Upload test result artifacts
299
276
uses : actions/upload-artifact@v4
@@ -317,4 +294,4 @@ jobs:
317
294
- name : Prune Docker images over 1 week old
318
295
# May fail if another prune is running
319
296
run : docker image prune --all --force --filter until=168h || true
320
- if : always()
297
+ if : always()
0 commit comments