DownloadBuildArtifacts@0 - 빌드 아티팩트 v0 작업 다운로드

이 작업을 사용하여 완료된 빌드의 아티팩트로 저장된 파일을 다운로드합니다.

Azure DevOps Services 사용하는 경우 성능 향상을 위해 파이프라인 아티팩트 다운로드파이프라인 아티팩트 게시를 사용하는 것이 좋습니다.

참고

Azure DevOps Server 사용하여 개인용 액세스 토큰으로 인증을 허용하는 경우 IIS 기본 인증을 사용하지 않도록 설정합니다. 자세한 내용은 IIS 기본 인증 및 PAT를 참조하세요.

빌드 아티팩트 다운로드

Syntax

# Download build artifacts v0
# Download files that were saved as artifacts of a completed build.
- task: DownloadBuildArtifacts@0
  inputs:
    buildType: 'current' # 'current' | 'specific'. Required. Download artifacts produced by. Default: current.
    #project: # string. Required when buildType == specific. Project. 
    #pipeline: # string. Alias: definition. Required when buildType == specific. Build pipeline. 
    #specificBuildWithTriggering: false # boolean. Optional. Use when buildType == specific. When appropriate, download artifacts from the triggering build. Default: false.
    #buildVersionToDownload: 'latest' # 'latest' | 'latestFromBranch' | 'specific'. Required when buildType == specific. Build version to download. Default: latest.
    #allowPartiallySucceededBuilds: false # boolean. Optional. Use when buildType == specific && buildVersionToDownload != specific. Download artifacts even from partially succeeded builds. Default: false.
    #branchName: 'refs/heads/master' # string. Required when buildType == specific && buildVersionToDownload == latestFromBranch. Branch name. Default: refs/heads/master.
    #buildId: # string. Required when buildType == specific && buildVersionToDownload == specific. Build. 
    #tags: # string. Optional. Use when buildType == specific && buildVersionToDownload != specific. Build Tags. 
    downloadType: 'single' # 'single' | 'specific'. Required. Download type. Default: single.
    artifactName: # string. Required when downloadType == single. Artifact name. 
    #itemPattern: '**' # string. Matching pattern. Default: **.
    downloadPath: '$(System.ArtifactsDirectory)' # string. Required. Destination directory. Default: $(System.ArtifactsDirectory).
    #cleanDestinationFolder: false # boolean. Clean destination folder. Default: false.
  # Advanced
    #parallelizationLimit: '8' # string. Parallelization limit. Default: 8.
    #checkDownloadedFiles: false # boolean. Check downloaded files. Default: false.
    #retryDownloadCount: '4' # string. Retry count. Default: 4.
    #retryRedirectDownloadCount: '0' # string. Retry count for redirect download. Default: 0.
    #extractTars: # boolean. Extract all files that are stored inside tar archives.
# Download build artifacts v0
# Download files that were saved as artifacts of a completed build.
- task: DownloadBuildArtifacts@0
  inputs:
    buildType: 'current' # 'current' | 'specific'. Required. Download artifacts produced by. Default: current.
    #project: # string. Required when buildType == specific. Project. 
    #pipeline: # string. Alias: definition. Required when buildType == specific. Build pipeline. 
    #specificBuildWithTriggering: false # boolean. Optional. Use when buildType == specific. When appropriate, download artifacts from the triggering build. Default: false.
    #buildVersionToDownload: 'latest' # 'latest' | 'latestFromBranch' | 'specific'. Required when buildType == specific. Build version to download. Default: latest.
    #allowPartiallySucceededBuilds: false # boolean. Optional. Use when buildType == specific && buildVersionToDownload != specific. Download artifacts even from partially succeeded builds. Default: false.
    #branchName: 'refs/heads/master' # string. Required when buildType == specific && buildVersionToDownload == latestFromBranch. Branch name. Default: refs/heads/master.
    #buildId: # string. Required when buildType == specific && buildVersionToDownload == specific. Build. 
    #tags: # string. Optional. Use when buildType == specific && buildVersionToDownload != specific. Build Tags. 
    downloadType: 'single' # 'single' | 'specific'. Required. Download type. Default: single.
    artifactName: # string. Required when downloadType == single. Artifact name. 
    #itemPattern: '**' # string. Matching pattern. Default: **.
    downloadPath: '$(System.ArtifactsDirectory)' # string. Required. Destination directory. Default: $(System.ArtifactsDirectory).
    #cleanDestinationFolder: false # boolean. Clean destination folder. Default: false.
  # Advanced
    #parallelizationLimit: '8' # string. Parallelization limit. Default: 8.
    #checkDownloadedFiles: false # boolean. Check downloaded files. Default: false.
    #retryDownloadCount: '4' # string. Retry count. Default: 4.
    #extractTars: # boolean. Extract all files that are stored inside tar archives.
# Download build artifacts v0
# Download files that were saved as artifacts of a completed build.
- task: DownloadBuildArtifacts@0
  inputs:
    buildType: 'current' # 'current' | 'specific'. Required. Download artifacts produced by. Default: current.
    #project: # string. Required when buildType == specific. Project. 
    #pipeline: # string. Alias: definition. Required when buildType == specific. Build pipeline. 
    #specificBuildWithTriggering: false # boolean. Optional. Use when buildType == specific. When appropriate, download artifacts from the triggering build. Default: false.
    #buildVersionToDownload: 'latest' # 'latest' | 'latestFromBranch' | 'specific'. Required when buildType == specific. Build version to download. Default: latest.
    #allowPartiallySucceededBuilds: false # boolean. Optional. Use when buildType == specific && buildVersionToDownload != specific. Download artifacts even from partially succeeded builds. Default: false.
    #branchName: 'refs/heads/master' # string. Required when buildType == specific && buildVersionToDownload == latestFromBranch. Branch name. Default: refs/heads/master.
    #buildId: # string. Required when buildType == specific && buildVersionToDownload == specific. Build. 
    #tags: # string. Optional. Use when buildType == specific && buildVersionToDownload != specific. Build Tags. 
    downloadType: 'single' # 'single' | 'specific'. Required. Download type. Default: single.
    artifactName: # string. Required when downloadType == single. Artifact name. 
    #itemPattern: '**' # string. Matching pattern. Default: **.
    downloadPath: '$(System.ArtifactsDirectory)' # string. Required. Destination directory. Default: $(System.ArtifactsDirectory).
  # Advanced
    #parallelizationLimit: '8' # string. Parallelization limit. Default: 8.
# Download Build Artifacts v0
# Download Build Artifacts.
- task: DownloadBuildArtifacts@0
  inputs:
    buildType: 'current' # 'current' | 'specific'. Required. Download artifacts produced by. Default: current.
    #project: # string. Required when buildType == specific. Project. 
    #pipeline: # string. Alias: definition. Required when buildType == specific. Build pipeline. 
    #specificBuildWithTriggering: false # boolean. Optional. Use when buildType == specific. When appropriate, download artifacts from the triggering build. Default: false.
    #buildVersionToDownload: 'latest' # 'latest' | 'latestFromBranch' | 'specific'. Required when buildType == specific. Build version to download. Default: latest.
    #branchName: 'refs/heads/master' # string. Required when buildType == specific && buildVersionToDownload == latestFromBranch. Branch name. Default: refs/heads/master.
    #buildId: # string. Required when buildType == specific && buildVersionToDownload == specific. Build. 
    #tags: # string. Optional. Use when buildType == specific && buildVersionToDownload != specific. Build Tags. 
    downloadType: 'single' # 'single' | 'specific'. Required. Download type. Default: single.
    artifactName: # string. Required when downloadType == single. Artifact name. 
    #itemPattern: '**' # string. Matching pattern. Default: **.
    downloadPath: '$(System.ArtifactsDirectory)' # string. Required. Destination directory. Default: $(System.ArtifactsDirectory).
  # Advanced
    #parallelizationLimit: '8' # string. Parallelization limit. Default: 8.

입력

buildType - 에서 생성된 아티팩트 다운로드
string. 필수 요소. 허용되는 값: current (현재 빌드), specific (특정 빌드). 기본값은 current입니다.

현재 빌드 또는 특정 빌드에서 생성된 아티팩트 다운로드 여부입니다.


project - 프로젝트
string. 필요한 경우 buildType == specific입니다.

빌드 아티팩트 다운로드하려는 프로젝트입니다.


pipeline - 빌드 파이프라인
입력 별칭: definition. string. 필요한 경우 buildType == specific입니다.

빌드 파이프라인 이름을 지정합니다.


specificBuildWithTriggering - 적절한 경우 트리거 빌드에서 아티팩트 다운로드
boolean. 선택 사항입니다. 를 사용하는 경우 buildType == specific를 사용합니다. 기본값은 false입니다.

이면 true이 빌드 작업은 트리거 빌드에서 아티팩트 다운로드를 시도합니다. 지정된 파이프라인에서 트리거 빌드가 없으면 아래 옵션에 지정된 빌드에서 아티팩트가 다운로드됩니다.


buildVersionToDownload - 다운로드할 빌드 버전
string. 필요한 경우 buildType == specific입니다. 허용되는 값: latest, latestFromBranch (특정 분기의 최신 항목 및 지정된 빌드 태그), specific (특정 버전). 기본값은 latest입니다.


allowPartiallySucceededBuilds - 부분적으로 성공한 빌드에서도 아티팩트 다운로드
boolean. 선택 사항입니다. 를 사용하는 경우 buildType == specific && buildVersionToDownload != specific를 사용합니다. 기본값은 false입니다.

이면 true이 빌드 작업은 빌드가 성공하는지 또는 부분적으로 성공하는지 여부에 관계없이 아티팩트 다운로드를 시도합니다.


branchName - 분기 이름
string. 필요한 경우 buildType == specific && buildVersionToDownload == latestFromBranch입니다. 기본값은 refs/heads/master입니다.

분기/참조 이름(예: refs/heads/develop)을 필터링할지 여부를 지정합니다.


buildId - 빌드
string. 필요한 경우 buildType == specific && buildVersionToDownload == specific입니다.

아티팩트 다운로드하려는 빌드입니다.


tags - 빌드 태그
string. 선택 사항입니다. 를 사용하는 경우 buildType == specific && buildVersionToDownload != specific를 사용합니다.

쉼표로 구분된 태그 목록입니다. 이러한 태그가 있는 빌드만 반환됩니다.


downloadType - 다운로드 유형
string. 필수 요소. 허용되는 값: single (특정 아티팩트), specific (특정 파일). 기본값은 single입니다.

빌드에서 특정 아티팩트 또는 특정 파일을 다운로드합니다.


artifactName - 아티팩트 이름
string. 필요한 경우 downloadType == single입니다.

다운로드할 아티팩트 이름입니다.


itemPattern - 일치 패턴
string. 기본값은 **입니다.

여러 줄 미니매치 패턴으로 다운로드할 파일을 지정합니다. 자세한 내용은 파일 일치 패턴 참조를 참조하세요.

기본 패턴 \*\* 은 특정 파일 옵션을 선택하는 경우 빌드의 모든 아티팩트에서 모든 파일을 다운로드합니다. 아티팩트 드롭 내의 모든 파일을 다운로드하려면 를 사용합니다 drop/**.

.


downloadPath - 대상 디렉터리
string. 필수 요소. 기본값은 $(System.ArtifactsDirectory)입니다.

아티팩트가 다운로드되는 에이전트 컴퓨터의 경로입니다.


cleanDestinationFolder - 대상 폴더 정리
boolean. 기본값은 false입니다.

아티팩트가 다운로드되기 전에 대상 폴더의 모든 기존 파일을 삭제합니다.


parallelizationLimit - 병렬화 제한
string. 기본값은 8입니다.

동시에 다운로드할 파일 수입니다.


checkDownloadedFiles - 다운로드한 파일 확인
boolean. 기본값은 false입니다.

이면 true이 빌드 태스크는 모든 파일이 완전히 다운로드되었는지 확인합니다.


retryDownloadCount - 재시도 횟수
string. 기본값은 4입니다.

다운로드가 실패할 경우 빌드 아티팩트 다운로드를 다시 시도할 횟수입니다.


retryRedirectDownloadCount - 리디렉션 다운로드에 대한 재시도 횟수
string. 기본값은 0입니다.

리디렉션 기반 다운로드가 실패하는 경우 빌드 아티팩트 다운로드를 다시 시도할 수 있는 선택적 횟수입니다. 네트워크에서 리디렉션을 허용하지 않는 경우 항상 Azure DevOps에서 스트리밍된 응답을 다운로드하도록 -1로 설정할 수 있습니다.


extractTars - tar 보관 파일 내에 저장된 모든 파일 추출
boolean.

확장명이 있는 다운로드한 모든 파일을 추출합니다 .tar . 이는 Unix 파일 권한을 유지하려는 경우 아티팩트 .tar 파일을 파일에 압축해야 하기 때문에 유용합니다. StoreAsTar PublishBuildArtifacts 작업에서 옵션을 사용하도록 설정하면 아티팩트가 자동으로 파일로 .tar 저장됩니다.


작업 제어 옵션

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

출력 변수

이 작업은 다운스트림 단계, 작업 및 단계에서 사용할 수 있는 다음 출력 변수를 정의합니다.

BuildNumber
빌드 아티팩트 원본의 빌드 번호를 저장합니다.

이 입력은 이전 버전과의 호환성으로 인해 BuildId 를 반환합니다. 자세한 내용은 변수를 참조하세요.

이 작업은 다운스트림 단계, 작업 및 단계에서 사용할 수 있는 다음 출력 변수를 정의합니다.

BuildNumber
빌드 아티팩트 원본의 빌드 번호를 저장합니다.

요구 사항

요구 사항 Description
파이프라인 유형 YAML, 클래식 빌드, 클래식 릴리스
실행 중 에이전트, DeploymentGroup
요청 없음
Capabilities 이 작업은 작업의 후속 작업에 대한 요구를 충족하지 않습니다.
명령 제한 사항 모두
설정 가능한 변수 모두
에이전트 버전 지원되는 모든 에이전트 버전.
작업 범주 유틸리티