gpt4 book ai didi

azure - 使用 Azure Devops Pipeline 将数据复制到没有公共(public)网络访问权限的存储帐户

转载 作者:行者123 更新时间:2023-12-03 07:01:02 26 4
gpt4 key购买 nike

我正在尝试使用以下指南备份 Azure DevOps 存储库:https://charbelnemnom.com/how-to-backup-azure-devops-git-repositories/

我的 YAML 文件如下:

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
branches:
include:
- '*'
stages:
- stage: _default
jobs:
- job: Job
pool:
vmImage: windows-latest
steps:
- task: CmdLine@2
inputs:
script: git clone --mirror https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="83d3c2d7d7ece8e6eddbdbdbdbc3e7e6f5ade2f9f6f1e6ade0ecee" rel="noreferrer noopener nofollow">[email protected]</a>/btc-cloud/test/_git/testrepo
- task: ArchiveFiles@2
inputs:
rootFolderorFile: $(System.DefaultWorkingDirectory)/testrepo.git
includeRootFolder: true
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/Backup.zip
- task: AzureFileCopy@3
displayName: AzureBlob File Copy
inputs:
SourcePath: $(Build.ArtifactStagingDirectory)/Backup.zip
azureSubscription: test backup of devops repo
Destination: AzureBlob
storage: 'storageaccountname'
ContainerName: 'devopsbackup'
BlobPrefix: 'az-devops-repo-backup'

只要公共(public)网络访问处于从所有网络启用状态,管道就可以正常工作。但是当我禁用公共(public)网络访问时,管道不再工作。有没有办法实现管道以使用专用网络(也许通过专用端点)?但由于我看不到如何将 DevOps 管道添加到专用网络的方法,因此当存储帐户禁用公共(public)网络访问权限时,我有点迷失了如何使管道工作。有人可能知道如何执行此操作或知道备份 Azure DevOps 项目的替代方法吗?

谢谢并致以最诚挚的问候!

最佳答案

您需要在有权访问您的专用网络的计算机上运行代理。通常,这可以通过使用可访问您的专用网络的自托管代理(安装在 VM、VMSS 或容器实例上)来实现。

如果您使用 Azure DevOps,您可以从组织设置中添加新池。

默认 Azure 代理使用公共(public)访问,无法访问仅限专用网络的存储帐户。

您可以找到更多详细信息here

关于azure - 使用 Azure Devops Pipeline 将数据复制到没有公共(public)网络访问权限的存储帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72360165/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com