Skip to content

Commit 5d9be68

Browse files
authored
Merge pull request #777 from snir911/gcp_oci_fix
gcp: use disk.raw naming at disk upload
2 parents 6ea0b9c + 502f8a5 commit 5d9be68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/peerpods/podvm/gcp-podvm-image-handler.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ function create_image_from_prebuilt_artifact() {
154154

155155
echo "Compacting ${RAW_IMAGE_PATH} into /tmp/${IMAGE_NAME}.tar.gz"
156156

157-
# TAR the raw image (GCP expects a compressed archive)
158-
tar -cvzf "/tmp/${IMAGE_NAME}.tar.gz" -C "$(dirname "${RAW_IMAGE_PATH}")" "$(basename "${RAW_IMAGE_PATH}")" ||
157+
# TAR the raw image (GCP expects a compressed archive with disk.raw named file)
158+
tar -cvzf "/tmp/${IMAGE_NAME}.tar.gz" -C "$(dirname "${RAW_IMAGE_PATH}")" --transform="s|$(basename "${RAW_IMAGE_PATH}")|disk.raw|" "$(basename "${RAW_IMAGE_PATH}")" ||
159159
error_exit "Failed to create tarball for GCP"
160160

161161
# Create bucket if doesn't exist

0 commit comments

Comments
 (0)