Azure-pipelines-tasks: DownloadPipelineArtifact task with tag not work in the multi stage

Created on 11 Jun 2020  路  7Comments  路  Source: microsoft/azure-pipelines-tasks

Required Information

DownloadPipelineArtifact task with tag not work from previous build stage:

- task: DownloadPipelineArtifact@2
  displayName: 'Download Latest DLLs'
  inputs:
    source: 'specific'
    project: $(System.TeamProjectId)
    pipeline: $(System.DefinitionId)            
    runVersion: 'latestFromBranch'
    runBranch: $(Build.SourceBranch)
    tags: 'myBuildTag'
    allowPartiallySucceededBuilds: true
    artifact: myArtifactName            
    patterns: '**/IntegrationTests/**/*'                      
    path: '$(Agent.TempDirectory)\myArtifactName'
  continueOnError: true

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DownloadPipelineArtifact

Environment

Azure devops

  • Agent - Hosted

Issue Description

https://stackoverflow.com/questions/62294343/downloading-latest-pipeline-artifact-from-branch-based-on-tag/62316756#62316756

ArtifactsCore bug

All 7 comments

Hi,

This also doesn't seem to be working on a single-stage pipeline when referencing a build definition other than the one that is currently running. Our use-case is to download an artifact from another pipeline based on a given tag.

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Please do not close this.

This is also affecting us on a single stage pipleine.

I'm also trying to achieve this but without tags. Came across this post:

Publishing and downloading the artifact within the same pipeline is not supported with source = 'specific'. Only source = 'current' is supported.

Is it true? Can't find any documentation about it here.

Same use case as wouterroos , specifying a build tag along with latestFromBranch causes No builds currently exist in the pipeline definition supplied; removing the tag filter downloads the latest from the branch.

I actually ran into the same problem some minutes ago. After some digging I realised, that the problem was, that I was setting the tag to a run rather than to a specific build. So check that you have added your tags either via the UI or cli (https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/pipelines/build/tag?view=azure-cli-latest) to your builds. In my case that helped.

Was this page helpful?
0 / 5 - 0 ratings