Azure DevOps pipelines: skip on error

Updated: 2023-07-12

In our case we want to continue with the CI / CD pipeline if a specific step or job fails, e.g. the karma tests for the frontend.

- task: Npm@1 
  displayName: Test frontend 
  continueOnError: true 
  ... 
- task: Npm@1 
  displayName: Build frontend Prod 
  condition: succeededOrFailed() # continue even if previous tests failed 

The 2 instructions that we use are:

  • continueOnError: true for the task that can fail.
  • condition: succeededOrFailed() for the task that follow the one that could fail.

continueOnError The step or job is annotated with a yellow warning sign because there are issues in this step but the pipeline continue to the next step.

succeededOrFailed it starts even if the previous job failed


Fullstack Angular / Java application quick start guide.
WebApp built by Marco using SpringBoot 3.2.4 and Java 21. Hosted in Switzerland (GE8).