@@ -515,6 +515,62 @@ jobs:
515
515
516
516
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
517
517
518
+ - name : Reboot instance
519
+ id : reboot_instance
520
+ run : |
521
+ ssh \
522
+ -o StrictHostKeyChecking=no \
523
+ -o UserKnownHostsFile=/dev/null \
524
+ -o LogLevel=ERROR \
525
+ exouser@$INSTANCE_IP \
526
+ 'sudo shutdown -r now || true'
527
+
528
+ sleep 10
529
+ function check_instance_ready {
530
+ ssh \
531
+ -o StrictHostKeyChecking=no \
532
+ -o UserKnownHostsFile=/dev/null \
533
+ -o LogLevel=ERROR \
534
+ exouser@$INSTANCE_IP \
535
+ 'true'
536
+ }
537
+ set +e
538
+ max_attempts=3
539
+ instance_ready=false
540
+ for attempt in $(seq 1 $max_attempts); do
541
+ echo "Checking if instance is ready ($attempt/$max_attempts)"
542
+ if check_instance_ready; then
543
+ instance_ready=true
544
+ echo "Instance '$INSTANCE_NAME' is ready."
545
+ break
546
+ else
547
+ echo "Instance '$INSTANCE_NAME' is not ready. Retrying in 5 seconds..."
548
+ sleep 10
549
+ fi
550
+ done
551
+ if ! $instance_ready; then
552
+ echo "::error ::Instance '$INSTANCE_NAME' is not ready after $max_attempts attempts to connect."
553
+ exit 1
554
+ fi
555
+ set -e
556
+ env :
557
+ INSTANCE_IP : ${{ steps.ip_create.outputs.floating_ip_address }}
558
+ INSTANCE_NAME : ${{ steps.define.outputs.instance_name }}
559
+
560
+ - name : comment (failed to install Slicer extension dependencies)
561
+ if :
562
+ ${{ steps.slicer_install_extension_dependencies.outcome == 'failure'
563
+ && failure() }}
564
+ uses :
peter-evans/[email protected]
565
+ with :
566
+ issue-number : ${{ github.event.issue.number }}
567
+ body : |
568
+ ### Instance Creation Results ❌
569
+
570
+ Failed to install Slicer extension dependencies on instance **${{ steps.define.outputs.instance_name }}**.
571
+
572
+ See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
573
+
518
574
- name : Update Request Status Label
519
575
id : update-request-status-label
520
576
uses : ./.github/actions/update-request-status-label
0 commit comments