question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Artifacts from SucceededWithIssues pipeline fail to download using DownloadPipelineArtifactV2

See original GitHub issue

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DownloadPipelineArtifactV2

Environment

  • Server - Azure Pipelines

  • Agent - Private Agent queue name: Default OS of the machine running the agent and the agent version: Windows, agent version 2.158.0

Issue Description

When I use DownloadPipelineArtifact@2 in my multi-stage yaml pipeline to download an artifact from a previous pipeline, it works well, if the previous Pipeline status is Succeeded. If for some reason, the pipeline status is SucceededWithIssues the task will fail.

The issue seems to be in the plugin (https://github.com/microsoft/azure-pipelines-agent/blob/master/src/Agent.Plugins/PipelineArtifact/PipelineArtifactPluginV2.cs) line (253 and 257) as it’s using BuildResult.Succeeded to filter builds.

Yaml

      - task: DownloadPipelineArtifact@2
        inputs:
          buildType: 'specific'
          project: 'ProjectId'
          definition: '4'
          specificBuildWithTriggering: true
          buildVersionToDownload: 'latest'
          tags: '1.0.0'
          artifactName: 'release'
          targetPath: '$(Pipeline.Workspace)\test'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
Thilascommented, Oct 18, 2019

I do have the same problem. Previously, when I was using DownloadBuildArtifactsV0 task instead of this new one DownloadPipelineArtifactV2, I proposed a PR to allow to download artifact from partially succeeded builds (see #8660).

And actually I would even like now to be able to download artifacts from failed builds, as long as they have a tag for instance that allows me to know whether a specific artifact has been published or not.

What I have in mind is a new task parameter that allows to determine builds to consider thanks to their job status thanks to a minimum value: Succeeded (default behavior), PartiallySucceeded or Failed.

If it makes sense, I can provide pull requests for both the task and the plugin in order to manage that.

0reactions
Thilascommented, Nov 2, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Download Pipeline Artifacts v2 task
Use this task to download pipeline artifacts from earlier stages in this pipeline, ... Download artifacts from failed builds.
Read more >
DownloadPipelineArtifact@2 not able to download from ...
We are using the DownloadPipelineArtifact@2 -task to download the build artifacts ... produces warnings, pipeline2 is unable to find the build artifact.
Read more >
Azure DevOps Build pipeline failed for ...
That task fails because you havent published an artifact with that pipeline. you have 2 different ways to publish artifacts:.
Read more >
Allow downloading artifacts from the API for failed jobs and ...
... job artifacts from the latest successful pipeline by using a URL ... want to download the job artifacts for the latest failed...
Read more >
Build Artifacts | Buildkite Documentation
You can upload artifacts using a pipeline step or by running the ... The buildkite-agent artifact download command can fail with the following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found