需要一种在构建过程中将一组文件从 Azure Blob 存储下载到项目存储库的方法。
该流程的目的是对移动应用程序进行 CI-CD。但是移动应用程序的图标、背景图像和一些其他图像是由其他应用程序提供的,因此在构建过程中图像应该从 blob 存储容器中获取。
您可以使用 Azure Powershell 来执行此操作,这可能是最简单的方法:
$storage = Get-AzStorageAccount -ResourceGroupName xxx -Name yyy
$ctx = $storageAccount.Context
# download blob
Get-AzStorageblobcontent -Blob "Image001.jpg" `
-Container $containerName `
-Destination "D:\_TestImages\Downloads\" `
-Context $ctx
Reading:
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-powershell#download-blobs https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-powershell#download-blobs
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)