이 작업을 사용하여 완료된 빌드의 아티팩트로 저장된 파일을 다운로드합니다.
Azure DevOps Services를 사용하는 경우 파이프라인 아티팩트 다운로드하고 더 빠른 성능을 위해 파이프라인 아티팩트 게시할 사용하는 것이 좋습니다.
비고
Azure DevOps Server를 사용하여 개인 액세스 토큰으로 인증을 허용하는 경우 IIS 기본 인증을 사용하지 않도록 설정합니다. 자세한 내용은 IIS 기본 인증 및 PAT 참조하세요.
구문론
# 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.
입력
buildType
-
의해 생성된 아티팩트 다운로드
string
; 필수 사항입니다. 허용되는 값: current
(현재 빌드), specific
(특정 빌드) 기본값은 current
입니다.
현재 빌드 또는 특정 빌드에서 생성된 아티팩트를 다운로드할지 여부입니다.
project
-
프로젝트
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
입니다.
분기/ref 이름(예: 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
파일로 압축해야 하기 때문에 유용합니다. PublishBuildArtifacts 작업에서 StoreAsTar
옵션을 사용하도록 설정하면 아티팩트가 자동으로 .tar
파일로 저장됩니다.
작업 제어 옵션
모든 작업에는 작업 입력 외에 제어 옵션이 있습니다. 자세한 내용은 컨트롤 옵션 및 일반적인 작업 속성참조하세요.
출력 변수
이 작업은 다운스트림 단계, 작업 및 단계에서 사용할 수 있는 다음 출력 변수정의합니다.
BuildNumber
빌드 아티팩트 원본의 빌드 번호를 저장합니다.
이 입력은 이전 버전과의 호환성으로 인해 BuildId 반환합니다. 자세한 내용은 변수참조하세요.
이 작업은 다운스트림 단계, 작업 및 단계에서 사용할 수 있는 다음 출력 변수정의합니다.
BuildNumber
빌드 아티팩트 원본의 빌드 번호를 저장합니다.