我正在处理一个用例,在该情况下,我将在从开发到UAT和生产的DB架构中部署DB架构,但是在部署到UAT和生产之前,我将UAT和Production均作为.bacpac文件备份。以下是我在Azure Devops Pipeline中执行的步骤
使用“ Azure SQL数据库部署”内置任务生成了.bacpac文件。在“ d:\ a \ r1 \ a \ generatedOutputfiles \ filename.bacpac
”上生成的文件
-
检查文件是否存在在上述路径上 -
-
使用“ Azure文件复制”内置任务复制到BLOB存储。我采用的源路径是$(system.ArtifactSdirectory)\ generatedoutputfiles
目的地是我的斑点容器。 PFA,有关每个步骤的详细信息以及Google Drive文档中的日志。问题是我无法将文件上传到BLOB存储,因为日志说源文件夹是空的,但是该文件存在于源文件夹中。
有人可以看一下,指导我在这里缺少什么吗?
I am working on a use case, where I will be deploying the DB schema from Development to UAT and Production, but before deploying to UAT and production, i am taking the backup of both UAT and production as a .bacpac file. Below are the steps I have performed in Azure DevOps pipeline
-
Generated the .bacpac file using "Azure SQL Database deployment" inbuilt task. The file generated at "D:\a\r1\a\GeneratedOutputFiles\filename.bacpac
-
check if the file exist on the above path -> Yes file is available.
-
Copy to blob storage using "Azure File Copy" inbuilt task. The Source path which I took is $(System.ArtifactsDirectory)\GeneratedOutputFiles
and destination is my blob container. PFA, the details about each step and the logs in the google drive document. The issue is I am not able to upload the file to blob storage as the logs says that the source folder is empty, but the file is present in the source folder.
Can someone please take a look and guide me what I am missing here?
Google Drive path of the document
发布评论
评论(2)
Azure Pipelines中文件复制任务的新的
V4
从使用Azcopy 8转移到Azcopy 10,它需要使用Azure Devops Service Principal进行更多的安全性才能使用Azure进行身份验证。您可以:
存储BLOB数据贡献者
和存储BLOB数据所有者
您可以在链接中找到更多详细信息:
httpps://github.com/github.com/microsoft/microsoft/azure-pipelines-pipelines-tasks/sisse/siss/siss/ 13124
and 。
The new
v4
of the File Copy Task in Azure Pipelines moved from using AzCopy 8 to AzCopy 10, and it requires more security for Azure DevOps Service Principal to authenticate with Azure.You can:
Storage Blob Data Contributor
andStorage Blob Data Owner
You can find more details in link:
https://github.com/microsoft/azure-pipelines-tasks/issues/13124
and https://brettmckenzie.net/2020/03/23/azure-pipelines-copy-files-task-authentication-failed/.
您可以使用
azcopy
从或从Azure Blob存储中复制文件。您可以访问此 Microsoft 下载并了解有关Azcopy的更多信息。
另外,要将文件从Azure VM复制到BLOB存储-azure-blob-storage-7d9a3d8fa47e“ rel =“ nofollow noreferrer”>第三方教程。
在Azcopy命令中,您将需要使用要复制.bacpac文件的容器的SAS令牌。
You can use
AzCopy
to copy files from or to Azure Blob storage.You can visit this official document by Microsoft to download and know more about AzCopy.
Also, to copy the files from Azure VM to Blob Storage follow this third-party tutorial.
In the AzCopy command, you will be required to use SAS Token of the container in which you want to copy the .bacpac file.