yandex-export: tiny improvements (#9554)

This commit is contained in:
GennadySpb 2020-07-09 11:46:51 +03:00 committed by GitHub
parent d5c40fb0a2
commit 919b54f4f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -100,6 +100,7 @@ eval "$(jq -r '@sh "export YC_SK_ID=\(.access_key.id); export AWS_ACCESS_KEY_ID=
echo "Check access to storage..." echo "Check access to storage..."
if ! aws s3 --endpoint-url=https://storage.yandexcloud.net ls > /dev/null ; then if ! aws s3 --endpoint-url=https://storage.yandexcloud.net ls > /dev/null ; then
echo "Failed to access storage." echo "Failed to access storage."
exit 1
fi fi
FAIL=0 FAIL=0
@ -119,6 +120,7 @@ done
echo "Delete static access key..." echo "Delete static access key..."
if ! yc iam access-key delete ${YC_SK_ID} ; then if ! yc iam access-key delete ${YC_SK_ID} ; then
echo "Failed to delete static access key." echo "Failed to delete static access key."
FAIL=1
fi fi
echo "Set metadata key to 'cloud-init-status' to 'cloud-init-done' value" echo "Set metadata key to 'cloud-init-status' to 'cloud-init-done' value"

View File

@ -63,7 +63,7 @@ must have write access to both `s3://packer-export/my-exported-image.qcow2` and
"type": "yandex", "type": "yandex",
"folder_id": "b1g8jvfcgmitdrslcn86", "folder_id": "b1g8jvfcgmitdrslcn86",
"subnet_id": "e9bp6l8sa4q39yourxzq", "subnet_id": "e9bp6l8sa4q39yourxzq",
"zone": "ru-central1-a" "zone": "ru-central1-a",
"source_image_family": "ubuntu-1604-lts", "source_image_family": "ubuntu-1604-lts",
"ssh_username": "ubuntu", "ssh_username": "ubuntu",
@ -85,4 +85,5 @@ must have write access to both `s3://packer-export/my-exported-image.qcow2` and
"keep_input_artifact": true "keep_input_artifact": true
} }
] ]
}``` }
```