title: Azure Devops Build Pipeline - Unexpected value stages
body: <p>I'm refactoring a pipeline to use a stage as template so I don't have duplicate code in my test-publish build pipeline and release build pipeline. But I get the error which I commented in the following <code>.yml</code> lines. </p>
  
  <pre><code>resources:
  - repo: self
    clean: true
  
  trigger:
    branches:
      include:
      - development
  
  stages: # error on this line: unexpected value 'stages'
   - template: build-job.yml
   - stage: Publish
     jobs:
     - job: PublishClickOnce
       steps:
       - task: PublishSymbols@2
         displayName: 'Publish symbols path'
         inputs:
           SearchPattern: '**\bin\**\*.pdb'
           PublishSymbols: false
         continueOnError: true
  </code></pre>
  
  <p>The example provided by <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#insert-a-template" rel="nofollow noreferrer">Microsoft</a>: </p>
  
  <blockquote>
  <pre><code># File: azure-pipelines.yml
  trigger:
  - master
  
  pool:
    vmImage: 'ubuntu-latest'
  
  stages:
  - stage: Install
    jobs: 
      - job: npminstall
        steps:
        - task: Npm@1
          inputs:
            command: 'install'
  - template: templates/stages1.yml
  - template: templates/stages2.yml
  </code></pre>
  </blockquote>
  
  <p>I checked against the documentation but can't see anything wrong with it. Can you point out my mistake and what I should change?</p>