Azure-devops-docs: Clarify location of downloaded artifacts

Created on 10 Feb 2019  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

I'm looking for something along the lines of: If you publish an artifact X from folder a/b/c and an artifact Y from folder d/e, then when you download both artifacts into target path f, then the final folder structure will look like...


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 devops-cictech devopprod doc-bug

Most helpful comment

We are going to be revising these docs very soon. We've got a bug right now in the Pipeline Artifact download logic in RM where it clobbers all the files together rather than putting each artifact in a separate directory. We are fixing that before we go GA (the fix is already rolling out I believe). We are also introducing simplified YAML syntax for working with artifacts, that is being worked on at the moment.

Once those elements land we'll refresh the docs.

All 7 comments

We are going to be revising these docs very soon. We've got a bug right now in the Pipeline Artifact download logic in RM where it clobbers all the files together rather than putting each artifact in a separate directory. We are fixing that before we go GA (the fix is already rolling out I believe). We are also introducing simplified YAML syntax for working with artifacts, that is being worked on at the moment.

Once those elements land we'll refresh the docs.

I think the issue is still there, all files end up here: $(Pipeline.Workspace) and not under a sub folder for the artifact.

@ohorvath are you still seeing this? I am seeing folders get populated.

Just following up, @letmaik @ohorvath are either of you still having this issue?

@ohorvath are you still seeing this? I am seeing folders get populated.

@chasewilson, I am still seeing this issue. I ran into it tonight when I used the following two tasks:

- task: PublishPipelineArtifact@1
  inputs:
    artifact: BinSkimFiles
    path: $(Build.SourcesDirectory)

- task: DownloadPipelineArtifact@2
  inputs:
  artifactName: BinSkimFiles

The download task copied the files to $(Pipeline.Workspace) (d:\a\1) not $(Pipeline.Workspace)/BinSkimFiles (d:\a\1\BinSkimFiles) as I would have expected. The documentation states that this should not occur. It states that "By default, files are downloaded to $(Pipeline.Workspace)/{artifact}, where artifact is the name of the artifact." (https://docs.microsoft.com/en-us/azure/devops/pipelines/artifacts/pipeline-artifacts?view=azure-devops&tabs=yaml#downloading-artifacts). Here is the output for the DownloadPipelineArtifact@2 command:

##[debug]Evaluating condition for step: 'DownloadPipelineArtifact'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
##[section]Starting: DownloadPipelineArtifact
==============================================================================
Task         : Download pipeline artifact
Description  : Download build and pipeline artifacts
Version      : 2.0.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/download-pipeline-artifact
==============================================================================
Download from the specified build: #169522
Download artifact to: d:\a\1
##[debug]Dedup parallelism: 192
Information, DedupManifestArtifactClient will correlate http requests with X-TFS-Session 112a36ef-5d4b-4dcd-b709-7c06a692548a
Information, Minimatch patterns: [**]
Information, Filtered 9 files from the Minimatch filters supplied.
Information, Could not initialize dataport.
Information, Downloaded 0.0 MB out of 1.9 MB (0%).
Information, Downloaded 1.9 MB out of 1.9 MB (100%).
Information, 
Download statistics:
Total Content: 1.9 MB
Physical Content Downloaded: 0.8 MB
Compression Saved: 1.1 MB
Local Caching Saved: 0.0 MB
Chunks Downloaded: 29
Nodes Downloaded: 0

Information, Download completed.
Downloading artifact finished.
##[section]Finishing: DownloadPipelineArtifact

I think this may be a documentation bug because I looked at the documentation for the DownloadPipelineArtifact@2 task and the documentation for its targetPath parameter states "Directory to download the artifact files. Can be relative to the pipeline workspace directory or absolute. If multi-download option is applied (by leaving an empty artifact name), a sub-directory will be created for each. See Artifacts in Azure Pipelines" (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-pipeline-artifact?view=azure-devops). This documentation contradicts the previous documentation I cited. Basically, this documentation states that DownloadPipelineArtifact@2 only creates a subdirectory for each artifact in $(Pipeline.Workspace) if DownloadPipelineArtifact@2's artifactName parameter is not specified. This fact is not mentioned in https://docs.microsoft.com/en-us/azure/devops/pipelines/artifacts/pipeline-artifacts?view=azure-devops&tabs=yaml#downloading-artifacts.

I can confirm what Benjamin claims. Any updates on this?

@thomps23 @steved0x Author's alias can't be found for assignment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atrauzzi picture atrauzzi  Â·  3Comments

o-o00o-o picture o-o00o-o  Â·  3Comments

Naphier picture Naphier  Â·  3Comments

KacperMucha picture KacperMucha  Â·  3Comments

michhar picture michhar  Â·  3Comments