azure-pipelines-tasks: Artifacts do not download on multi stage yaml build using DownloadPipelineArtifactV2
Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: DownloadPipelineArtifactV2
Environment
-
Server - Azure Pipelines
- account name:
lambda3
- team project name:
sdk
- build definition name:
template
- build number: buildid:
12494
- account name:
-
Agent - Hosted:
- agent queue name:
Default
- OS of the machine running the agent and the agent version: Windows, agent version
2.155.1
- agent queue name:
Issue Description
When you try to download the artifacts on a multi stage build definition using the DownloadPipelineArtifactV2
task it will only download the artifacts from the first stage. In my scenario I have 3 stages, and I product the artifacts on the second stage, while the first stage only has a code coverage artifact. What I’ve seen is that the code coverage artifacts (1st stage) download, while the ones from the 2nd stage don’t.
Note: I am using a self hosted agent, and I noted that the artifacts were not being removed between each build, which created problems, as leftover artifacts from previous builds were still around. So, I had the idea of downloading the artifacts to the Agent.TempDirectory
, so it would be removed for sure.
This was all on a deployment stage.
If you let the download happen naturally, it will download all the artifacts, the problem only happens when you use the DownloadPipelineArtifactV2
task directly.
I also noticed that the Build Summary shows no artifacts for the second stage, it only shows one artifact for the 1st stage. But the artifacts tab does show all 3 artifacts.
Task logs
These are the partial logs for the download of the last two artifacts, named vsix
and nupkg
:
Information, Start downloading artifact - vsix
Information, Minimatch patterns: [**]
Information, Filtered 1 files from the Minimatch filters supplied.
Information, Could not initialize dataport.
Information, Downloaded 0.0 MB out of 0.1 MB (0%).
Information, Downloaded 0.1 MB out of 0.1 MB (100%).
Information,
Download statistics:
Total Content: 0.1 MB
Physical Content Downloaded: 0.1 MB
Compression Saved: 0.0 MB
Local Caching Saved: 0.0 MB
Chunks Downloaded: 1
Nodes Downloaded: 0
Information, Start downloading artifact - nupkgs
Information, Minimatch patterns: [**]
Information, Filtered 1 files from the Minimatch filters supplied.
Information, Could not initialize dataport.
Information, Downloaded 0.0 MB out of 0.0 MB (0%).
Information, Downloaded 0.0 MB out of 0.0 MB (100%).
Information,
Download statistics:
Total Content: 0.0 MB
Physical Content Downloaded: 0.0 MB
Compression Saved: 0.0 MB
Local Caching Saved: 0.0 MB
Chunks Downloaded: 1
Nodes Downloaded: 0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 16 (8 by maintainers)
If the solution is using the “DownloadPipelineArtifact task instead of the download keyword” then @microsoft you need to update your docs - this is driving folks crazy.
It was resolved by switching to using the DownloadPipelineArtifact task instead of the download keyword. Setting dependent stages did not resolve the issue, however I have been able to work around it.
@GarethOates Sorry for the inconvenience. Fro the download keyword, unfortunately the target input field is currently not exposed but it should have the capability for users to specify a custom download directory very soon. For now if you’d like to use a different download directory, yes, you will need to define the task fully.