AzureFileCopy@2 - Azure 파일 복사 v2 작업

파일을 Azure Blob Storage 또는 가상 머신에 복사합니다.

Syntax

# Azure file copy v2
# Copy files to Azure Blob Storage or virtual machines.
- task: AzureFileCopy@2
  inputs:
    SourcePath: # string. Required. Source. 
    #azureConnectionType: 'ConnectedServiceNameARM' # 'ConnectedServiceName' | 'ConnectedServiceNameARM'. Alias: ConnectedServiceNameSelector. Azure Connection Type. Default: ConnectedServiceNameARM.
    #azureClassicSubscription: # string. Alias: ConnectedServiceName. Required when ConnectedServiceNameSelector = ConnectedServiceName. Azure Classic Subscription. 
    azureSubscription: # string. Alias: ConnectedServiceNameARM. Required when ConnectedServiceNameSelector = ConnectedServiceNameARM. Azure Subscription. 
    Destination: # 'AzureBlob' | 'AzureVMs'. Required. Destination Type. 
    #classicStorage: # string. Alias: StorageAccount. Required when ConnectedServiceNameSelector = ConnectedServiceName. Classic Storage Account. 
    storage: # string. Alias: StorageAccountRM. Required when ConnectedServiceNameSelector = ConnectedServiceNameARM. RM Storage Account. 
    #ContainerName: # string. Required when Destination = AzureBlob. Container Name. 
    #BlobPrefix: # string. Optional. Use when Destination = AzureBlob. Blob Prefix. 
    #cloudService: # string. Alias: EnvironmentName. Required when ConnectedServiceNameSelector = ConnectedServiceName && Destination = AzureVMs. Cloud Service. 
    #resourceGroup: # string. Alias: EnvironmentNameRM. Required when ConnectedServiceNameSelector = ConnectedServiceNameARM && Destination = AzureVMs. Resource Group. 
    #ResourceFilteringMethod: 'machineNames' # 'machineNames' | 'tags'. Optional. Use when Destination = AzureVMs. Select Machines By. Default: machineNames.
    #MachineNames: # string. Optional. Use when Destination = AzureVMs. Filter Criteria. 
    #vmsAdminUserName: # string. Required when Destination = AzureVMs. Admin Login. 
    #vmsAdminPassword: # string. Required when Destination = AzureVMs. Password. 
    #TargetPath: # string. Required when Destination = AzureVMs. Destination Folder. 
    #AdditionalArgumentsForBlobCopy: # string. Optional Arguments (for uploading files to blob). 
    #AdditionalArgumentsForVMCopy: # string. Optional. Use when Destination = AzureVMs. Optional Arguments (for downloading files to VM). 
    #enableCopyPrerequisites: false # boolean. Optional. Use when ConnectedServiceNameSelector = ConnectedServiceNameARM && Destination = AzureVMs. Enable Copy Prerequisites. Default: false.
    #CopyFilesInParallel: true # boolean. Optional. Use when Destination = AzureVMs. Copy in Parallel. Default: true.
    #CleanTargetBeforeCopy: false # boolean. Optional. Use when Destination = AzureVMs. Clean Target. Default: false.
    #skipCACheck: true # boolean. Optional. Use when Destination = AzureVMs. Test Certificate. Default: true.
  # Output
    #outputStorageUri: # string. Storage Container URI. 
    #outputStorageContainerSasToken: # string. Storage Container SAS Token.
# Azure File Copy v2
# Copy files to Azure blob or VM(s).
- task: AzureFileCopy@2
  inputs:
    SourcePath: # string. Required. Source. 
    #azureConnectionType: 'ConnectedServiceNameARM' # 'ConnectedServiceName' | 'ConnectedServiceNameARM'. Alias: ConnectedServiceNameSelector. Azure Connection Type. Default: ConnectedServiceNameARM.
    #azureClassicSubscription: # string. Alias: ConnectedServiceName. Required when ConnectedServiceNameSelector = ConnectedServiceName. Azure Classic Subscription. 
    azureSubscription: # string. Alias: ConnectedServiceNameARM. Required when ConnectedServiceNameSelector = ConnectedServiceNameARM. Azure Subscription. 
    Destination: # 'AzureBlob' | 'AzureVMs'. Required. Destination Type. 
    #classicStorage: # string. Alias: StorageAccount. Required when ConnectedServiceNameSelector = ConnectedServiceName. Classic Storage Account. 
    storage: # string. Alias: StorageAccountRM. Required when ConnectedServiceNameSelector = ConnectedServiceNameARM. RM Storage Account. 
    #ContainerName: # string. Required when Destination = AzureBlob. Container Name. 
    #BlobPrefix: # string. Optional. Use when Destination = AzureBlob. Blob Prefix. 
    #cloudService: # string. Alias: EnvironmentName. Required when ConnectedServiceNameSelector = ConnectedServiceName && Destination = AzureVMs. Cloud Service. 
    #resourceGroup: # string. Alias: EnvironmentNameRM. Required when ConnectedServiceNameSelector = ConnectedServiceNameARM && Destination = AzureVMs. Resource Group. 
    #ResourceFilteringMethod: 'machineNames' # 'machineNames' | 'tags'. Optional. Use when Destination = AzureVMs. Select Machines By. Default: machineNames.
    #MachineNames: # string. Optional. Use when Destination = AzureVMs. Filter Criteria. 
    #vmsAdminUserName: # string. Required when Destination = AzureVMs. Admin Login. 
    #vmsAdminPassword: # string. Required when Destination = AzureVMs. Password. 
    #TargetPath: # string. Required when Destination = AzureVMs. Destination Folder. 
    #AdditionalArgumentsForBlobCopy: # string. Optional Arguments (for uploading files to blob). 
    #AdditionalArgumentsForVMCopy: # string. Optional. Use when Destination = AzureVMs. Optional Arguments (for downloading files to VM). 
    #enableCopyPrerequisites: false # boolean. Optional. Use when ConnectedServiceNameSelector = ConnectedServiceNameARM && Destination = AzureVMs. Enable Copy Prerequisites. Default: false.
    #CopyFilesInParallel: true # boolean. Optional. Use when Destination = AzureVMs. Copy in Parallel. Default: true.
    #CleanTargetBeforeCopy: false # boolean. Optional. Use when Destination = AzureVMs. Clean Target. Default: false.
    #skipCACheck: true # boolean. Optional. Use when Destination = AzureVMs. Test Certificate. Default: true.
  # Output
    #outputStorageUri: # string. Storage Container URI. 
    #outputStorageContainerSasToken: # string. Storage Container SAS Token.

입력

SourcePath - 소스
string. 필수 요소.

원본 폴더, 로컬 컴퓨터의 파일 또는 UNC 공유에 대한 절대 경로를 지정합니다. 지정된 값 또는 식은 단일 폴더 이름 또는 파일 이름을 반환해야 합니다.


azureConnectionType - Azure 연결 유형
입력 별칭: ConnectedServiceNameSelector. string. 허용되는 값: ConnectedServiceName (Azure 클래식), ConnectedServiceNameARM (Azure Resource Manager). 기본값은 ConnectedServiceNameARM입니다.

Azure 연결 유형을 지정합니다.


azureClassicSubscription - Azure 클래식 구독
입력 별칭: ConnectedServiceName. string. 필요한 경우 ConnectedServiceNameSelector = ConnectedServiceName입니다.

대상 Azure 클래식 구독을 지정합니다.


azureSubscription - Azure 구독
입력 별칭: ConnectedServiceNameARM. string. 필요한 경우 ConnectedServiceNameSelector = ConnectedServiceNameARM입니다.

대상 Azure Resource Manager 구독을 지정합니다.


Destination - 대상 유형
string. 필수 요소. 허용되는 값: AzureBlob (Azure Blob), AzureVMs (Azure VM).

파일 복사에 사용할 대상 유형을 지정합니다.


classicStorage - 클래식 스토리지 계정
입력 별칭: StorageAccount. string. 필요한 경우 ConnectedServiceNameSelector = ConnectedServiceName입니다.

기존 클래식 스토리지 계정을 지정합니다. Azure VM에 파일을 복사하기 위한 중개자로 사용되는 스토리지 계정입니다.


storage - RM Storage 계정
입력 별칭: StorageAccountRM. string. 필요한 경우 ConnectedServiceNameSelector = ConnectedServiceNameARM입니다.

기존 ARM 스토리지 계정을 지정합니다. Azure VM에 파일을 복사하기 위한 중개자로 사용되는 스토리지 계정입니다.


ContainerName - 컨테이너 이름
string. 필요한 경우 Destination = AzureBlob입니다.

파일이 복사되는 컨테이너의 이름을 지정합니다. 지정된 컨테이너가 스토리지 계정에 없으면 만들어집니다.

컨테이너 내에 가상 디렉터리를 만들려면 Blob 접두사 입력을 사용합니다. 예를 들어 대상 위치 https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/의 경우 컨테이너 이름 mycontainer 및 Blob 접두사 를 지정합니다 vd1/vd2.


BlobPrefix - Blob 접두사
string. 선택 사항입니다. 를 사용하는 경우 Destination = AzureBlob를 사용합니다.

파일을 필터링하는 데 사용할 수 있는 접두사를 지정합니다.

예: 빌드 번호를 추가하여 동일한 빌드 번호를 가진 모든 Blob에서 파일을 필터링할 수 있습니다.

예: Blob 접 myvd1두사를 지정하면 컨테이너 내에 가상 디렉터리가 만들어집니다. 파일은 원본 https://myaccount.blob.core.windows.net/mycontainer/myvd1/에서 로 복사됩니다.


cloudService - 클라우드 서비스
입력 별칭: EnvironmentName. string. 필요한 경우 ConnectedServiceNameSelector = ConnectedServiceName && Destination = AzureVMs입니다.

대상 Cloud Service의 이름을 지정합니다.


resourceGroup - 리소스 그룹
입력 별칭: EnvironmentNameRM. string. 필요한 경우 ConnectedServiceNameSelector = ConnectedServiceNameARM && Destination = AzureVMs입니다.

대상 리소스 그룹의 이름을 지정합니다.


ResourceFilteringMethod - 컴퓨터 기준 선택
string. 선택 사항입니다. 를 사용하는 경우 Destination = AzureVMs를 사용합니다. 허용되는 값: machineNames (컴퓨터 이름), tags. 기본값은 machineNames입니다.

리소스 그룹의 VM 하위 집합을 식별하는 VM 호스트 이름 또는 태그를 지정합니다. 태그는 Azure Resource Manager 통해 만든 리소스에 대해서만 지원됩니다.


MachineNames - 필터 조건
string. 선택 사항입니다. 를 사용하는 경우 Destination = AzureVMs를 사용합니다.

Azure VM 호스트 이름(예: , ffdb또는 태그(예: ffwebRole:DB, , WebOS:Win8.1)의 목록을 제공합니다.

참고: 태그의 유효한 구분 기호에는 ,(쉼표), :(콜론) 및 ;(세미콜론)이 포함됩니다. 여러 태그를 제공할 때 작업은 지정된 태그를 포함하는 모든 VM에서 실행됩니다. 기본적으로 작업은 모든 VM에서 실행됩니다.


vmsAdminUserName - 관리 로그인
string. 필요한 경우 Destination = AzureVMs입니다.

Azure VM 관리자 계정의 사용자 이름을 제공합니다.


vmsAdminPassword - 암호
string. 필요한 경우 Destination = AzureVMs입니다.

Azure VM 관리자 계정에 대한 암호를 제공합니다.

유효한 입력에는 와 같은 $(passwordVariable)빌드 또는 릴리스 파이프라인에 정의된 변수가 포함됩니다. 암호를 보호하려면 암호를 로 secret표시합니다.


TargetPath - 대상 폴더
string. 필요한 경우 Destination = AzureVMs입니다.

대상 VM에서 로컬 경로를 지정합니다.

유효한 입력에는 와 같은 $env:windir\BudgetIT\Web환경 변수가 포함됩니다.


AdditionalArgumentsForBlobCopy - 선택적 인수(Blob에 파일 업로드용)
string.

와 같은 /NC:10Blob에 AzCopy.exe 업로드할 때 적용할 수 있는 추가 인수를 제공합니다.

선택적 인수를 지정하지 않으면 기본적으로 다음 인수가 추가됩니다.

  • /Y
  • /SetContentType
  • /Z
  • /V
  • /S - 컨테이너 이름이 이 아닌 $root경우 추가됩니다.
  • /BlobType:page - 지정된 스토리지 계정이 프리미엄 계정일 때 추가됩니다.
  • /Pattern - 원본 경로가 파일일 때 추가됩니다. 지정된 다른 선택적 인수에 포함됩니다.

AdditionalArgumentsForVMCopy - 선택적 인수(VM에 파일 다운로드용)
string. 선택 사항입니다. 를 사용하는 경우 Destination = AzureVMs를 사용합니다.

와 같은 /NC:10VM에 AzCopy.exe 다운로드할 때 적용할 수 있는 추가 인수를 제공합니다.

선택적 인수를 지정하지 않으면 기본적으로 다음이 추가됩니다.

  • /Y
  • /S
  • /Z
  • /V

enableCopyPrerequisites - 복사 필수 구성 요소 사용
boolean. 선택 사항입니다. 을 사용할 때 ConnectedServiceNameSelector = ConnectedServiceNameARM && Destination = AzureVMs사용합니다. 기본값은 false입니다.

사용하도록 설정하면 자체 서명된 인증서를 사용하여 HTTPS 프로토콜 대신 포트 5986에서 WinRM(Windows 원격 관리) 수신기를 구성합니다. Azure VM에서 복사 작업을 수행하는 데 필요합니다. 대상 VM이 부하 분산 장치를 사용하는 경우 대상 포트(5986)에 대한 인바운드 NAT 규칙을 구성합니다. ARM VM에만 적용됩니다.


CopyFilesInParallel - 병렬로 복사
boolean. 선택 사항입니다. 을 사용할 때 Destination = AzureVMs사용합니다. 기본값은 true입니다.

기본 설정을 적용하면 파일이 대상 VM과 병렬로 복사됩니다.


CleanTargetBeforeCopy - 대상 정리
boolean. 선택 사항입니다. 을 사용할 때 Destination = AzureVMs사용합니다. 기본값은 false입니다.

이 값을 로 설정하면 true 복사 작업을 수행하기 전에 대상 폴더가 정리됩니다.


skipCACheck - 인증서 테스트
boolean. 선택 사항입니다. 을 사용할 때 Destination = AzureVMs사용합니다. 기본값은 true입니다.

기본값은 HTTPS를 통해 연결하기 전에 신뢰할 수 있는 CA가 서버 인증서에 서명했는지 확인하지 않습니다.


outputStorageUri - 스토리지 컨테이너 URI
string.

파일이 복사된 스토리지 컨테이너 URI에 사용되는 변수의 이름을 지정합니다. 선택한 대상이 Azure Blob인 경우에만 유효합니다.


outputStorageContainerSasToken - 스토리지 컨테이너 SAS 토큰
string.

복사된 파일에 액세스하는 스토리지 컨테이너 SAS 토큰에 사용되는 변수의 이름을 지정합니다. 선택한 대상이 Azure Blob인 경우에만 유효합니다.


작업 제어 옵션

모든 작업에는 작업 입력 외에 제어 옵션이 있습니다. 자세한 내용은 컨트롤 옵션 및 일반적인 작업 속성을 참조하세요.

출력 변수

없음

설명

버전 2.0의 새로운 기능: 최신 버전의 AzCopy 사용.

요구 사항

요구 사항 Description
파이프라인 유형 YAML, 클래식 빌드, 클래식 릴리스
실행 중 에이전트, DeploymentGroup
요청 자체 호스팅 에이전트에는 이 작업을 사용하는 작업을 실행하기 위한 다음 요구 사항과 일치하는 기능이 있어야 합니다. azureps
Capabilities 이 작업은 작업의 후속 작업에 대한 요구를 충족하지 않습니다.
명령 제한 사항 모두
설정 가능한 변수 모두
에이전트 버전 1.103.0 이상
작업 범주 배포