Skip to content

Commit d169fef

Browse files
committed
List of MorphoCloudWorkflow changes: ``` $ git shortlog b64b997..e52143d --no-merges Jean-Christophe Fillion-Robin (2): feat(create-instance): Set instance properties like "exoSetup" only after reboot fix(create-instance): Fix step checking if reboot was successful ``` See MorphoCloud/MorphoCloudWorkflow@b64b997...e52143d
1 parent 8d5010c commit d169fef

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

.github/workflows/create-instance.yml

+30-4
Original file line numberDiff line numberDiff line change
@@ -573,17 +573,43 @@ jobs:
573573
INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }}
574574
INSTANCE_NAME: ${{ steps.define.outputs.instance_name }}
575575

576-
- name: comment (failed to install Slicer extension dependencies)
576+
- name: comment (failed to reboot instance)
577+
if: ${{ steps.reboot_instance.outcome == 'failure' && failure() }}
578+
uses: peter-evans/[email protected]
579+
with:
580+
issue-number: ${{ github.event.issue.number }}
581+
body: |
582+
### Instance Creation Results ❌
583+
584+
Failed to reboot instance **${{ steps.define.outputs.instance_name }}**.
585+
586+
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
587+
588+
- name: Set instance properties
589+
id: set_instance_properties
590+
run: |
591+
source ~/venv/bin/activate
592+
593+
# Explicitly set status to complete
594+
exoSetup='{"status":"complete", "epoch": '$(date '+%s')'000}'
595+
596+
openstack server set \
597+
--property "exoSetup=$exoSetup" \
598+
$INSTANCE_NAME
599+
env:
600+
OS_CLOUD: ${{ vars.MORPHOCLOUD_OS_CLOUD }}
601+
INSTANCE_NAME: ${{ steps.define.outputs.instance_name }}
602+
603+
- name: comment (failed to set instance properties)
577604
if:
578-
${{ steps.slicer_install_extension_dependencies.outcome == 'failure'
579-
&& failure() }}
605+
${{ steps.set_instance_properties.outcome == 'failure' && failure() }}
580606
uses: peter-evans/[email protected]
581607
with:
582608
issue-number: ${{ github.event.issue.number }}
583609
body: |
584610
### Instance Creation Results ❌
585611
586-
Failed to install Slicer extension dependencies on instance **${{ steps.define.outputs.instance_name }}**.
612+
Failed to set instance **${{ steps.define.outputs.instance_name }}** properties.
587613
588614
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
589615

0 commit comments

Comments
 (0)