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