Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
List of MorphoCloudWorkflow changes:

```
$ git shortlog 057c707..b23226c --no-merges
Jean-Christophe Fillion-Robin (1):
      fix(create-instance): Ensure installed files are moved into attached volume
```

See MorphoCloud/MorphoCloudWorkflow@057c707...b23226c
  • Loading branch information
jcfr committed Nov 25, 2024
1 parent b010e67 commit 1cd661b
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/create-instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,30 @@ jobs:
attach_volume:
send_email: ""

- name: Rename MyData directory to MyData-tmp
id: rename_mydata
run: |
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-o LogLevel=ERROR \
exouser@$INSTANCE_IP \
'mv /media/volume/MyData /media/volume/MyData-tmp'
env:
INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }}

- name: comment (failed to rename MyData)
if: ${{ steps.rename_mydata.outcome == 'failure' && failure() }}
uses: peter-evans/[email protected]
with:
issue-number: ${{ github.event.issue.number }}
body: |
### Instance Creation Results ❌
Failed to rename `/media/volume/MyData` to `/media/volume/MyData-tmp` for instance **${{ steps.define.outputs.instance_name }}**.
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Attach Volume
id: attach_volume
run: |
Expand Down Expand Up @@ -419,6 +443,30 @@ jobs:
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Copy installed files into attached volume
id: copy_installed_files
run: |
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-o LogLevel=ERROR \
exouser@$INSTANCE_IP \
'mv /media/volume/MyData-tmp/Slicer /media/volume/MyData/Slicer && mv /media/volume/MyData-tmp/dist /media/volume/MyData/dist'
env:
INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }}

- name: comment (failed to copy installed files from MyData-tmp to MyData)
if: ${{ steps.copy_installed_files.outcome == 'failure' && failure() }}
uses: peter-evans/[email protected]
with:
issue-number: ${{ github.event.issue.number }}
body: |
### Instance Creation Results ❌
Failed to copy installed files from `/media/volume/MyData-tmp` to `/media/volume/MyData` for instance **${{ steps.define.outputs.instance_name }}**.
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Update Request Status Label
id: update-request-status-label
uses: ./.github/actions/update-request-status-label
Expand Down

0 comments on commit 1cd661b

Please sign in to comment.