title: How to split this duplicated Azure DevOps steps into a reusable template
body: <p>I have the following Azure DevOps template, which is currently hardcoded to some specific files. I'm hoping to refactor it into a simpler template using loops so I don't need to duplicate (and hardcode) specific files.</p>
  
  <p>[ pseduo code for brevity ]</p>
  
  <pre><code>#tests.yml
  
  steps:
  
    # pre-test steps. This is done once.
  
    - script: install tool1
    - script: install tool2
    - script: setup path stuff.
  
    # Tests
    - script: test project1 |
              display codecoverage to console-out
    - script: test project 2 |
              display codecoverage to console-out
  
    # Post-tests
    - script: upload coverage report for project1
    - script: upload coverage report for project2
    - task: PublishTestResults@2 # publish test results to Azure DevOps.
  </code></pre>
  
  <p>So notice how i'm doing this <em>per project</em></p>
  
  <ul>
  <li>test project</li>
  <li>display codecoverage result to console-out (so i can see the results here)</li>
  <li>upload result to 3rd party website (for others to see also)</li>
  </ul>
  
  <p>I was hoping there might be a way I can someone pass in the info into the template and then just loop through the array of input data.</p>
  
  <p>like this..</p>
  
  <pre><code>steps:
  
    # pre tests.
    ...
  
    # tests
    foreach project in projects
      - script: test project |
                display code coverage report
      - script: upload report
  
    # post-test
    ...
  </code></pre>
  
  <p>can this be done in Azure DevOps ?</p>
  
  <ul>
    - 
  </ul>