Download Build Artifacts task
Azure DevOps Services
Note
We recommend upgrading from build artifacts (PublishBuildArtifacts@1 and DownloadBuildArtifacts@0) to pipeline artifacts (PublishPipelineArtifact@1 and DownloadPipelineArtifact@2) for faster performance.
Use this task to download build artifacts.
YAML snippet
# Download build artifacts
# Download files that were saved as artifacts of a completed build
- task: DownloadBuildArtifacts@0
inputs:
#buildType: 'current' # Options: current, specific
#project: # Required when buildType == Specific
#pipeline: # Required when buildType == Specific
#specificBuildWithTriggering: false # Optional
#buildVersionToDownload: 'latest' # Required when buildType == Specific. Options: latest, latestFromBranch, specific
#allowPartiallySucceededBuilds: false # Optional
#branchName: 'refs/heads/master' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch
#buildId: # Required when buildType == Specific && BuildVersionToDownload == Specific
#tags: # Optional
#downloadType: 'single' # Choose whether to download a single artifact or all artifacts of a specific build. Options: single, specific
#artifactName: # Required when downloadType == Single
#itemPattern: '**' # Optional
#downloadPath: '$(System.ArtifactsDirectory)'
#cleanDestinationFolder: false # Optional
#parallelizationLimit: '8' # Optional
#extractTars: false # Optional
Arguments
| Argument | Description |
|---|---|
buildTypeDownload artifacts produced by |
(Required) Download artifacts produced by the current build, or from a specific build Default value: current |
projectProject |
(Required) The project from which to download the build artifacts |
definitionBuild pipeline |
(Required) Select the build pipeline name Argument aliases: pipeline |
specificBuildWithTriggeringWhen appropriate, download artifacts from the triggering build |
(Optional) If true, this build task will try to download artifacts from the triggering build. If there is no triggering build from the specified pipeline, it will download artifacts from the build specified in the options below. Default value: false |
buildVersionToDownloadBuild version to download |
(Required) Specify which version of the build to download.
|
allowPartiallySucceededBuildsDownload artifacts even from partially succeeded builds |
(Optional) If checked, this build task will try to download artifacts whether the build is succeeded or partially succeeded Default value: false |
branchNameBranch name |
(Required) Specify to filter on branch/ref name. Default value: refs/heads/master |
buildIdBuild |
(Required) The build from which to download the artifacts |
tagsBuild tags |
(Optional) A comma-delimited list of tags. Only builds with these tags will be returned. |
downloadTypeDownload type |
(Required) Choose whether to download a single artifact or all artifacts of a specific build. Default value: single |
artifactNameArtifact name |
(Required) The name of the artifact to download |
itemPatternMatching pattern |
(Optional) Specify files to be downloaded as multi-line minimatch pattern. More Information. The default pattern will download all files across all artifacts in the build if the Specific files option is selected. To download all files within an artifact drop use drop/ Default value: \*\* |
downloadPathDestination directory |
(Required) Path on the agent machine where the artifacts will be downloaded Default value: $(System.ArtifactsDirectory) |
cleanDestinationFolderClean destination folder |
(Optional) Delete all existing files in destination folder before artifacts are downloaded Default value: false |
parallelizationLimitParallelization limit |
(Optional) Number of files to download simultaneously Default value: 8 |
extractTarsExtract all files that are stored inside tar archives |
(Optional) Extract all .tar files. Enabling StoreAsTar option in PublishBuildArtifacts task will store artifacts as .tar files automatically. This option allows you to preserve Unix file permissions. Ignored on Windows. Default value: false |
Open source
This task is open source on GitHub. Feedback and contributions are welcome.
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ