title: Azure multistage pipelines: conditionally skip one stage but not the next
body: <p>I have an Azure multi-stage CI/CD pipeline. It has stages for Test and UAT deployment.</p>
  
  <p>I want the UAT release to run if Test succeeds or is skipped, but not if it fails.</p>
  
  <p>I can't.  Whatever I try, if Test is skipped, UAT is also skipped.  Unless I use <code>always()</code>, but then UAT will run even if Test fails.</p>
  
  <pre><code>  ...
    - stage: Test
      condition: and(succeeded(), ne(variables['build.sourceBranchName'], 'DoUAT')) # Skip for UAT deployment tests
      ...
  
    - stage: UAT
      condition: and(succeeded(), in(variables['build.sourceBranchName'], 'master', 'DoUAT')) # Only deploy off master branch and branch to test UAT deploys.
      ...
  </code></pre>
  
  <p>How do I skip one stage but not the next one?</p>
  
  <p><a href="https://i.stack.imgur.com/0JO2n.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0JO2n.png" alt="What I get vs what I want"></a></p>