[英]How to copy .json file stored in azure devOps repo to azure storage account as a blob?
There is a filed which is stored in repository in azure devOps.有一个文件存储在 azure devOps 的存储库中。 I want to transfer that file to the azure storage account on daily basis.
我想每天将该文件传输到 azure 存储帐户。 Is there any way, we can do that?
有什么办法,我们可以做到吗?
Lets suppose File name is Hack.json and stored on a path in github repo: Azure-Models/samples/src/Hack.json and we want to store it in storage account container with name samples.假设文件名是 Hack.json 并存储在 github 存储库中的路径上:Azure-Models/samples/src/Hack.json 并且我们希望将其存储在具有样本名称的存储帐户容器中。
You can use pipeline with schedule with defined cron and AzureFileCopy task您可以使用带有已定义 cron和AzureFileCopy 任务的计划的管道
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- main
always: true
trigger: none
pr: none
steps:
# Azure file copy
# Copy files to Azure Blob Storage or virtual machines
- task: AzureFileCopy@4
inputs:
sourcePath:
azureSubscription:
destination: # Options: azureBlob, azureVMs
storage:
#containerName: # Required when destination == AzureBlob
#blobPrefix: # Optional
#resourceGroup: # Required when destination == AzureVMs
#resourceFilteringMethod: 'machineNames' # Optional. Options: machineNames, tags
#machineNames: # Optional
#vmsAdminUserName: # Required when destination == AzureVMs
#vmsAdminPassword: # Required when destination == AzureVMs
#targetPath: # Required when destination == AzureVMs
#additionalArgumentsForBlobCopy: # Optional
#additionalArgumentsForVMCopy: # Optional
#enableCopyPrerequisites: false # Optional
#copyFilesInParallel: true # Optional
#cleanTargetBeforeCopy: false # Optional
#skipCACheck: true # Optional
#sasTokenTimeOutInMinutes: # Optional
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.