title: How to find runID from artifact in azure devops yaml pipeline
body: <p>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.</p>
  <p><strong>Previously</strong></p>
  <p>In the second pipeline I used to be able to get the runID from previous pipeline by running:</p>
  <pre><code>$(resources.pipeline.&lt;artifactName&gt;.runID)
  </code></pre>
  <p>I was using the shortcut to download the artifact to the entire pipeline like:</p>
  <pre><code>resources:
    pipelines:
    - pipeline: &lt;artifactName&gt;
      source: &lt;pipelineName&gt;
  </code></pre>
  <p><strong>Currently</strong> <em>(not working)</em></p>
  <p>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:
  <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-pipeline-artifact?view=azure-devops" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-pipeline-artifact?view=azure-devops</a></p>
  <p>Specifically:</p>
  <pre><code>- task: DownloadPipelineArtifact@2
            inputs:
              source: 'specific'
              project: '&lt;myProjectName&gt;'
              pipeline: &lt;firstPipelineID&gt;
              artifact: '&lt;artifactName&gt;'
              targetPath: $(Pipeline.Workspace)
              tags: &lt;myTag&gt;
  </code></pre>
  <p>I try to get the runID from the artifact almost like previously:</p>
  <pre><code>$(Pipeline.Workspace.&lt;artifactName&gt;.runID)
  </code></pre>
  <p>I can not get the runID. Does anybody know how to do this?</p>
  <p>Thank you</p>