I currently write a Azure pipeline YAML which downloads the latest development artifacts and executes different tests in different environments.
Since every kind of test is modeled as its own Job, the first step of the job is downloading the artifact (documentation).
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'specific'
project: '[hidden]'
definition: '[hidden]'
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/development'
How can I achieve that every job takes the same artifact, also if a newer is created during the pipeline run?
My first approach was downloading the latest artifact and extracting the concrete version. But I wasn't able to get the build id which is required as pipelineId
for downloading a specific version.