[ad_1]
I have a yaml pipeline that produces an artifact, and in another pipeline I want to consume this artifact and use it. The specific problem is that I can no longer find the runID from the run that produced the artifact.
Previously
In the second pipeline I used to be able to get the runID from previous pipeline by running:
$(resources.pipeline.<artifactName>.runID)
I was using the shortcut to download the artifact to the entire pipeline like:
resources:
pipelines:
- pipeline: <artifactName>
source: <pipelineName>
Currently (not working)
Now I am using a task that will instead download the artifact to a specific stage (not to the entire pipeline), and I select it through different tags on the pipeline-run. I follow this documentation:
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-pipeline-artifact?view=azure-devops
Specifically:
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: '<myProjectName>'
pipeline: <firstPipelineID>
artifact: '<artifactName>'
targetPath: $(Pipeline.Workspace)
tags: <myTag>
I try to get the runID from the artifact almost like previously:
$(Pipeline.Workspace.<artifactName>.runID)
I can not get the runID. Does anybody know how to do this?
Thank you
[ad_2]