76
76
description : Git ref to checkout (convenience for external CI)
77
77
type : string
78
78
default : ${{ github.ref }}
79
+ user-ssh-public-key :
80
+ description : User's SSH public key to access AIOs
81
+ type : string
79
82
secrets :
80
83
KAYOBE_VAULT_PASSWORD :
81
84
required : true
@@ -262,6 +265,17 @@ jobs:
262
265
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
263
266
echo "EOF" >> $GITHUB_OUTPUT
264
267
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
+
265
279
# The same tag may be reused (e.g. stackhpc/yoga), so ensure we have the latest image.
266
280
- name : Pull previous Kayobe image
267
281
run : |
@@ -481,6 +495,7 @@ jobs:
481
495
if : ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-cloud-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
482
496
483
497
- name : Fail if any tests failed
498
+ id : test-result
484
499
run : |
485
500
rc=0
486
501
if [[ $(wc -l < tempest-artifacts/failed-tests) -ne 0 ]]; then
@@ -495,6 +510,11 @@ jobs:
495
510
fi
496
511
exit $rc
497
512
513
+ - name : Break on failure
514
+ run : |
515
+ sleep 360m
516
+ if : steps.test-result.outcome != 'success'
517
+
498
518
- name : Destroy
499
519
run : terraform destroy -auto-approve
500
520
working-directory : ${{ github.workspace }}/terraform/aio
0 commit comments