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,9 @@ jobs:
262
265
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
263
266
echo "EOF" >> $GITHUB_OUTPUT
264
267
268
+ env :
269
+ KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
270
+
265
271
# The same tag may be reused (e.g. stackhpc/yoga), so ensure we have the latest image.
266
272
- name : Pull previous Kayobe image
267
273
run : |
@@ -315,6 +321,15 @@ jobs:
315
321
env :
316
322
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
317
323
324
+ - name : Add user's SSH key to authorized_keys
325
+ run : |
326
+ docker run -t --rm \
327
+ -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
328
+ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
329
+ ${{ steps.kayobe_image.outputs.kayobe_image }} \
330
+ /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-command-run.sh \
331
+ -b --command "echo '${{ inputs.user-ssh-public-key }} << EOF' >> /home/${{ inputs.ssh_username }}/.ssh/authorized_keys"
332
+
318
333
- name : Service deploy
319
334
run : |
320
335
docker run -t --rm \
@@ -481,6 +496,7 @@ jobs:
481
496
if : ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-cloud-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
482
497
483
498
- name : Fail if any tests failed
499
+ id : test-result
484
500
run : |
485
501
rc=0
486
502
if [[ $(wc -l < tempest-artifacts/failed-tests) -ne 0 ]]; then
@@ -495,6 +511,11 @@ jobs:
495
511
fi
496
512
exit $rc
497
513
514
+ - name : Break on failure
515
+ run : |
516
+ sleep 360m
517
+ if : steps.test-result.outcome != 'success'
518
+
498
519
- name : Destroy
499
520
run : terraform destroy -auto-approve
500
521
working-directory : ${{ github.workspace }}/terraform/aio
0 commit comments