Skip to content

Commit c203ac8

Browse files
committed
Test: break on test failure
1 parent f562b82 commit c203ac8

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ on:
7676
description: Git ref to checkout (convenience for external CI)
7777
type: string
7878
default: ${{ github.ref }}
79+
user-ssh-public-key:
80+
description: User's SSH public key to access AIOs
81+
type: string
7982
secrets:
8083
KAYOBE_VAULT_PASSWORD:
8184
required: true
@@ -262,6 +265,17 @@ jobs:
262265
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
263266
echo "EOF" >> $GITHUB_OUTPUT
264267
268+
- name: Add user's SSH key to authorized_keys
269+
run: |
270+
docker run -t --rm \
271+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
272+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
273+
${{ steps.kayobe_image.outputs.kayobe_image }} \
274+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-command-run.sh \
275+
"echo '${{ inputs.user-ssh-public-key }} << EOF' >> /home/${{ inputs.ssh_username }}/.ssh/authorized_keys"
276+
env:
277+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
278+
265279
# The same tag may be reused (e.g. stackhpc/yoga), so ensure we have the latest image.
266280
- name: Pull previous Kayobe image
267281
run: |
@@ -481,6 +495,7 @@ jobs:
481495
if: ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-cloud-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
482496

483497
- name: Fail if any tests failed
498+
id: test-result
484499
run: |
485500
rc=0
486501
if [[ $(wc -l < tempest-artifacts/failed-tests) -ne 0 ]]; then
@@ -495,6 +510,11 @@ jobs:
495510
fi
496511
exit $rc
497512
513+
- name: Break on failure
514+
run: |
515+
sleep 360m
516+
if: steps.test-result.outcome != 'success'
517+
498518
- name: Destroy
499519
run: terraform destroy -auto-approve
500520
working-directory: ${{ github.workspace }}/terraform/aio

.github/workflows/stackhpc-pull-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ jobs:
215215
OS_CLOUD: openstack
216216
if: ${{ needs.check-changes.outputs.aio == 'true' }}
217217
upgrade: true
218+
user-ssh-public-key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM53flpem/kWEAbXNS+57THFUSGMP14o8Lqpny2DVDgmt9yuP66On6HUgnrYusekcTlW99jz91JHXvUGK/6QXgIi51LEZi7juclnIE0LB9JhaMW3UWZwp2Voc8k9EXFR4fx8z2GMBRS10LriYdcVptOddba6+TK3gSA7dOiA4HE0VyZbMGcdpcghPJC5RcI+KMDI5HtAJMyFUhXkTF7vLfEgbNzURjRmW0jfKfWckWE0SvSM4I8Ub1QQLFmuPDQHfXi42OH6GqKb1S5OjTVDKngv5NMjPkoEwiQj9w7FDjuCjoJXvYJc6vi2TQYqDNyGijjwAj/4iiKcS589X9Utzn3yvhilmIlUmlpn8Be1MSI2HM1pMNGgGhm+axwmZCEsb6DrAWtctUaYDgg2q71BEw8f+aVHMKNIT4AB6caKak7oPygt/eCcAXKycPxaWM3qpoPtaR/hYpZBjycWiA7qi52AERcB7nYos2AP/e2rKJJsrBuXSopZobF+fHtYYs/Os="
218219
secrets: inherit
219220
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
220221

0 commit comments

Comments
 (0)