File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 99env :
1010 S3_BUCKET : openhpc-images-prerelease
1111 IMAGE_PATH : environments/.stackhpc/tofu/cluster_image.auto.tfvars.json
12+ RUNNER_IMAGE_DIR : /mnt/images
1213
1314permissions :
1415 contents : read
@@ -97,20 +98,22 @@ jobs:
9798 run : |
9899 . venv/bin/activate
99100 df -h
100- openstack image save --file "/mnt/${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
101+ sudo mkdir ${{ env.RUNNER_IMAGE_DIR }}
102+ sudo chmod ugo=rwX ${{ env.RUNNER_IMAGE_DIR }}
103+ openstack image save --file "${{ env.RUNNER_IMAGE_DIR }}/${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
101104 df -h
102105 shell : bash
103106
104107 - name : Convert image to QCOW2
105108 run : |
106109 . venv/bin/activate
107- qemu-img convert -f raw -O qcow2 -c "/mnt /${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
110+ qemu-img convert -f raw -O qcow2 -c "${{ env.RUNNER_IMAGE_DIR }} /${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
108111 shell : bash
109112
110113 - name : Upload Image to S3
111114 run : |
112115 echo "Uploading Image: ${{ env.TARGET_IMAGE }} to S3..."
113- s3cmd --multipart-chunk-size-mb=150 put "/mnt /${{ env.TARGET_IMAGE }}" s3://${{ env.S3_BUCKET }}
116+ s3cmd --multipart-chunk-size-mb=150 put "${{ env.RUNNER_IMAGE_DIR }} /${{ env.TARGET_IMAGE }}" s3://${{ env.S3_BUCKET }}
114117 shell : bash
115118
116119 image_sync :
You can’t perform that action at this time.
0 commit comments