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,9 @@ jobs:
262265 cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
263266 echo "EOF" >> $GITHUB_OUTPUT
264267
268+ env :
269+ KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
270+
265271 # The same tag may be reused (e.g. stackhpc/yoga), so ensure we have the latest image.
266272 - name : Pull previous Kayobe image
267273 run : |
@@ -315,6 +321,17 @@ jobs:
315321 env :
316322 KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
317323
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/stack/.ssh/authorized_keys"
332+ env :
333+ KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
334+
318335 - name : Service deploy
319336 run : |
320337 docker run -t --rm \
@@ -481,6 +498,7 @@ jobs:
481498 if : ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-cloud-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
482499
483500 - name : Fail if any tests failed
501+ id : test-result
484502 run : |
485503 rc=0
486504 if [[ $(wc -l < tempest-artifacts/failed-tests) -ne 0 ]]; then
@@ -494,6 +512,12 @@ jobs:
494512 rc=1
495513 fi
496514 exit $rc
515+ continue-on-error : true
516+
517+ - name : Break on failure
518+ run : |
519+ sleep 360m
520+ if : steps.test-result.outcome != 'success'
497521
498522 - name : Destroy
499523 run : terraform destroy -auto-approve
0 commit comments