File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
ci/tasks/azure-image-upload-and-start-publishing Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,20 @@ update_offer() {
8585
8686
8787copy_blob_to_premiumstore () {
88+ # Generate SAS token for source blob
89+ source_sas=$( az storage blob generate-sas \
90+ --account-name " ${AZURE_STORAGE_ACCOUNT} " \
91+ --account-key " ${AZURE_STORAGE_ACCESS_KEY} " \
92+ --container-name " ${AZURE_CONTAINER_NAME} " \
93+ --name " ${vhd_path} " \
94+ --permissions r \
95+ --expiry $( date -u -d " +1 hour" ' +%Y-%m-%dT%H:%M:%SZ' ) \
96+ --output tsv)
97+
98+ source_url=" https://${AZURE_STORAGE_ACCOUNT} .blob.core.windows.net/${AZURE_CONTAINER_NAME} /${vhd_path} ?${source_sas} "
99+
88100 az storage blob copy start \
89- --source-account-key " ${AZURE_STORAGE_ACCESS_KEY} " \
90- --source-account-name " ${AZURE_STORAGE_ACCOUNT} " \
91- --source-container " ${AZURE_CONTAINER_NAME} " \
92- --source-blob " ${vhd_path} " \
101+ --source-uri " ${source_url} " \
93102 --account-name " ${AZURE_PUBLISHED_STORAGE_ACCOUNT} " \
94103 --account-key " ${AZURE_PUBLISHED_STORAGE_ACCESS_KEY} " \
95104 --destination-container " ${AZURE_CONTAINER_NAME} " \
You can’t perform that action at this time.
0 commit comments