I am trying to download the latest available artifact for a given tag from the current build pipeline and branch, but I am getting the following error.
##[error]No builds currently exist in the pipeline definition supplied.
This is a 3 stage pipeline for automation testing with build, deploy, and run tests stages. In the run tests stage I am trying to download the most recently available artifact in the build stage, which might be this run, or it might be an earlier run.
If I leave the tags option out, it will try and fetch it from the last available run, but this artifact may not have been created then, hence my use of tags to try and filter it.
- 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
Any help would be appreciated