Skip to content

Commit 4bbcda5

Browse files
committed
Test job to see if we can cancel midway through.
1 parent 64db7d0 commit 4bbcda5

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ jobs:
8181
uses: ConorMacBride/install-package@main
8282
with:
8383
apt: build-essential git unzip nodejs python3 python3-pip python3-wheel python-is-python3
84-
if: ${{ !cancelled() }}
8584

8685
- uses: actions/checkout@v4
8786
with:
@@ -90,13 +89,13 @@ jobs:
9089
- name: Make sure dockerd is running and test Docker.
9190
run: |
9291
docker run --rm hello-world
93-
if: ${{ !cancelled() }}
92+
9493
9594
- name: Output image tag
9695
id: image_tag
9796
run: |
9897
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() }}
98+
10099
101100
# Use the image override if set, otherwise use overcloud-os_distribution-os_release-tag
102101
- name: Output image name
@@ -107,29 +106,29 @@ jobs:
107106
else
108107
echo image_name=${{ inputs.vm_image_override }} >> $GITHUB_OUTPUT
109108
fi
110-
if: ${{ !cancelled() }}
109+
111110
112111
- name: Install terraform
113112
uses: hashicorp/setup-terraform@v2
114-
if: ${{ !cancelled() }}
113+
115114

116115
- name: Initialise terraform
117116
run: terraform init
118117
working-directory: ${{ github.workspace }}/terraform/aio
119-
if: ${{ !cancelled() }}
118+
120119

121120
- name: Generate SSH keypair
122121
run: ssh-keygen -f id_rsa -N ''
123122
working-directory: ${{ github.workspace }}/terraform/aio
124-
if: ${{ !cancelled() }}
123+
125124

126125
- name: Generate clouds.yaml
127126
run: |
128127
cat << EOF > clouds.yaml
129128
${{ secrets.CLOUDS_YAML }}
130129
EOF
131130
working-directory: ${{ github.workspace }}/terraform/aio
132-
if: ${{ !cancelled() }}
131+
133132

134133
- name: Generate terraform.tfvars
135134
run: |
@@ -152,7 +151,7 @@ jobs:
152151
VM_NETWORK: ${{ inputs.vm_network }}
153152
VM_SUBNET: ${{ inputs.vm_subnet }}
154153
VM_INTERFACE: ${{ inputs.vm_interface }}
155-
if: ${{ !cancelled() }}
154+
156155

157156
- name: Terraform Plan
158157
run: terraform plan
@@ -161,7 +160,7 @@ jobs:
161160
OS_CLOUD: ${{ inputs.OS_CLOUD }}
162161
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
163162
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
164-
if: ${{ !cancelled() }}
163+
165164

166165
- name: Terraform Apply
167166
run: terraform apply -auto-approve
@@ -170,21 +169,21 @@ jobs:
170169
OS_CLOUD: ${{ inputs.OS_CLOUD }}
171170
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
172171
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
173-
if: ${{ !cancelled() }}
172+
174173

175174
- name: Get Terraform outputs
176175
id: tf_outputs
177176
run: |
178177
terraform output -json
179178
working-directory: ${{ github.workspace }}/terraform/aio
180-
if: ${{ !cancelled() }}
179+
181180

182181
- name: Write Terraform outputs
183182
run: |
184183
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/tf-outputs.yml
185184
${{ steps.tf_outputs.outputs.stdout }}
186185
EOF
187-
if: ${{ !cancelled() }}
186+
188187
189188
- name: Write Terraform network config
190189
run: |
@@ -199,14 +198,14 @@ jobs:
199198
admin_ips:
200199
controller0: "{{ access_ip_v4.value }}"
201200
EOF
202-
if: ${{ !cancelled() }}
201+
203202
204203
- name: Write Terraform network interface config
205204
run: |
206205
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/inventory/group_vars/controllers/tf-network-interfaces
207206
admin_interface: "{{ access_interface.value }}"
208207
EOF
209-
if: ${{ !cancelled() }}
208+
210209
211210
- name: Write all-in-one scenario config
212211
run: |
@@ -220,7 +219,7 @@ jobs:
220219
ENABLE_OVN: ${{ inputs.neutron_plugin == 'ovn' }}
221220
OS_DISTRIBUTION: ${{ inputs.os_distribution }}
222221
OS_RELEASE: ${{ inputs.os_release }}
223-
if: ${{ !cancelled() }}
222+
224223

225224
# Use a heredoc to define a multiline string output
226225
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
@@ -230,13 +229,13 @@ jobs:
230229
echo "ssh_key<<EOF" >> $GITHUB_OUTPUT
231230
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
232231
echo "EOF" >> $GITHUB_OUTPUT
233-
if: ${{ !cancelled() }}
232+
234233
235234
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
236235
- name: Pull latest Kayobe image
237236
run: |
238237
docker image pull $KAYOBE_IMAGE
239-
if: ${{ !cancelled() }}
238+
240239
241240
- name: Run growroot
242241
run: |
@@ -247,7 +246,7 @@ jobs:
247246
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml'
248247
env:
249248
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
250-
if: ${{ !cancelled() }}
249+
251250

252251
- name: Host configure
253252
run: |
@@ -258,7 +257,7 @@ jobs:
258257
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
259258
env:
260259
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
261-
if: ${{ !cancelled() }}
260+
262261

263262
- name: Service deploy
264263
run: |
@@ -269,7 +268,7 @@ jobs:
269268
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-service-deploy.sh
270269
env:
271270
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
272-
if: ${{ !cancelled() }}
271+
273272

274273
- name: Configure aio resources
275274
run: |
@@ -280,7 +279,7 @@ jobs:
280279
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml
281280
env:
282281
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
283-
if: ${{ !cancelled() }}
282+
284283

285284

286285
- name: Tempest tests
@@ -294,7 +293,7 @@ jobs:
294293
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/tempest.sh -e ansible_user=stack
295294
env:
296295
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
297-
if: ${{ !cancelled() }}
296+
298297

299298
- name: Upload test result artifacts
300299
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)