title: Azure Pipeline Resource Branch
body: <p>EDIT: Please ignore the parts about <code>tags</code> -- as one of the answers noted, this came from a design doc and has not been fully implemented. I'm primarly concerned about the <code>branch</code> property.</p>
  <hr />
  <h3>Question</h3>
  <p>How do the pipeline resource <code>branch</code> (<a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&amp;tabs=schema#resources-pipelines" rel="nofollow noreferrer">docs</a>) and <code>tags</code> (<a href="https://github.com/microsoft/azure-pipelines-yaml/blob/master/design/pipeline-resources.md" rel="nofollow noreferrer">found on GitHub</a> but not the docs) properties work? The <code>version</code> property correctly selects the default version of a resource, but <code>branch</code> and <code>tags</code> appear to do nothing.</p>
  <p>I expect <code>branch</code> to similarly default to the latest run with that branch as the source, and <code>tags</code> to default to the latest run with those tags. Is it broken or am I misunderstanding the behavior?</p>
  <h3>Test</h3>
  <p>I have two pipelines to run in series:</p>
  <ul>
  <li>Test-Build runs on master trigger or manually and publishes an artifact (tried both Build and Pipeline artifacts)</li>
  <li>Test-Release has a Test-Build pipeline resource</li>
  </ul>
  <p>Now I tried 3 different tests:</p>
  <ol>
  <li>Specify the <code>version</code> property on the resource. Success: Resource correctly chooses that version.</li>
  <li>Specify the <code>branch</code> property on the resource. Failure: <a href="https://i.stack.imgur.com/oa8Ce.png" rel="nofollow noreferrer">default resource will be the latest, even if from a different branch.</a></li>
  <li>Specify the <code>tags</code> property on the resource. Failure: default resource will be the latest, even without those tags.</li>
  </ol>
  <h3>Sample Files</h3>
  <p>Test-Build</p>
  <pre><code>trigger:
  - master
  
  pool:
    vmImage: 'ubuntu-latest'
  
  steps:
  - task: PublishPipelineArtifact@1
    inputs:
      targetPath: '$(Pipeline.Workspace)'
      artifact: 'drop'
      publishLocation: 'pipeline'
  </code></pre>
  <p>Test-Release</p>
  <pre><code>trigger: none
  
  resources:
    pipelines:
    - pipeline: TestBuild
      source: Test-Build
      branch: master
  
  jobs:
  - deployment: TestDeployment
    environment: Test
    pool:
      vmImage: 'ubuntu-latest'
    strategy:
      runOnce:
        deploy:
          steps:
          - script: echo Deploying!
  </code></pre>