title: Is it possible to cancel a Azure DevOps pipeline Job programmatically?
body: <p>As it is possible to stop a single step in a Azure DevOps pipeline:</p>
  
  <pre class="lang-sh prettyprint-override"><code>echo "##vso[task.complete result=Succeeded;]DONE"
  </code></pre>
  
  <p>See: <a href="https://github.com/microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md#task-logging-commands" rel="noreferrer">https://github.com/microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md#task-logging-commands</a></p>
  
  <p>Is it also possible to check a condition and stop the whole pipeline run or job depending on that?</p>
  
  <p>PS. I know, you can set conditions to jobs, but in my case the whole pipeline is a single job and it does not make sense to split it into multiple jobs, because of other reasons.</p>