简体   繁体   English

如何将存储在 azure devOps 存储库中的 json 文件作为 blob 复制到 azure 存储帐户?

[英]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您可以使用带有已定义 cronAzureFileCopy 任务的计划的管道

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.

相关问题 Azure DevOps 步骤将 YAML 从 Azure 存储帐户复制到 DevOps 存储库 - Azure Devops step copy YAML from Azure storage account to DevOps repo 使用 Azure DevOps 中的 Azure 文件复制任务将数据从存储帐户复制到存储帐户 - Using Azure File Copy Task in Azure DevOps to Copy Data from Storage Account to Storage Account Powershell:将文件从 Azure 文件共享复制到 Blob 存储帐户 - Powershell: Copy file from Azure File Share to Blob Storage account Azure将Blob复制到不同的高级存储帐户 - Azure Copy blob to different premium storage account 使用Azure DevOps以不同的订阅将文件复制到Azure Blob存储 - Copy files to Azure Blob storage in different suscriptions with Azure DevOps 如何使用 .net 核心从不同存储帐户的 Azure 文件共享(不是 blob)复制文件 - How to copy files from Azure File-Share (not blob) of different storage account using .net core 在 React 中获取存储在 Azure blob 存储中的 json 文件数据 - Get json file data which stored in Azure blob storage in React How can I append JSON data to an existing JSON file stored in Azure blob storage through python? - How can I append JSON data to an existing JSON file stored in Azure blob storage through python? 如何将 blob(Excel 文件)上传到 Azure 存储帐户 - How to upload a blob (Excel file) to an Azure Storage account 如何从存储在Azure blob存储中的json文件中获取数据 - How to get data from json file stored in Azure blob storage in react
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM