title: Skipped pipeline stage in Azure devops
body: <h1>Problem</h1>
  <p>When the pipeline underneath is triggered, the <strong>Dev</strong> stage is not being run after <strong>Build and push</strong>.</p>
  <p><a href="https://i.stack.imgur.com/Z1pGy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Z1pGy.png" alt="enter image description here" /></a></p>
  <p>The pipeline is triggered with a PR with develop as the target branch.</p>
  <p><strong>pipeline.yaml</strong></p>
  <pre class="lang-yaml prettyprint-override"><code>trigger:
    branches:
      include:
        - master
        - develop
  
  pr:
    branches:
      include:
        - develop
  
  stages:
    # Frontend tests: Triggered by opening new PRs to develop or updating pr to develop.
    - stage: FrontEndTests
      displayName: &quot;Frontend tests&quot;
      condition: eq( variables['Build.Reason'], 'PullRequest') #  Trigger stage only for PullRequests
      jobs:
        - template: /templates/pipelines/npm-unit-tests.yml@templates
          parameters:
            triggerType: ${{ variables.triggerType }}
  
    # Common build triggered by push to master or develop
    - stage: BuildPush
      displayName: &quot;Build and push&quot;
      condition: ne(variables['Build.Reason'], 'PullRequest') # Don't perform stage if PR triggered pipeline
      variables:
        envName: &quot;common&quot;
  
      jobs:
        - template: /templates/pipelines/dockerbuild-dashboard-client.yml@templates
          parameters:
            displayName: &quot;Build docker image&quot;
            deploymentName: &quot;docker_build_push&quot;
            dependsOn: &quot;&quot;
  
    # Dev deploy stage
    - stage: dev
      displayName: &quot;Dev&quot;
      dependsOn: BuildPush
      condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
      variables:
        envName: &quot;dev&quot;
  
      jobs:
        - template: /templates/pipelines/webapprelease-dashboard-dev-client.yml@templates
          parameters:
            dependsOn: &quot;&quot;
            deploymentName: &quot;publish_container_to_webapp&quot;
            
    # Test deploy stage
    - stage: test
      displayName: &quot;Test&quot;
      dependsOn: BuildPush
      condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/develop'))
  
      jobs:
        - template: /templates/pipelines/webapprelease-dashboard-test-client.yml@templates
          parameters:
            dependsOn: &quot;&quot;
            deploymentName: &quot;publish_container_to_webapp&quot;
  
    # Prod deploy stage
    - stage: prod
      displayName: &quot;Prod&quot;
      dependsOn: test
      condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
      variables:
        envName: &quot;prod&quot;
  
      jobs:
        - template: /templates/pipelines/webapprelease-dashboard-prod-client.yml@templates
          parameters:
            dependsOn: &quot;&quot;
            deploymentName: &quot;publish_container_to_webapp&quot;
  </code></pre>
  <h1>Question</h1>
  <p>Why is the Dev stage not run? It seems to me that the conditions for the <code>dev</code> stage are <strong>not</strong> met, but I cannot see why.</p>