Reputation: 29
Pipeline is not failing even though the application errors are reported in one of the task. For that i have used failonstderr: true in the pipeline and pipeline detects the errors and start failing. But the problem is failing the pipeline for warnings also. But i am looking for the pipeline should fail when errors are reportedenter image description here not on warnings. Is there any alternate solution?
Upvotes: 2
Views: 7759
Reputation: 753
You could set the control option of each task by disabling Continue on error
and running this task Only when all previous tasks have succeeded
. Then, if any errors are reported in the task, the pipeline will fail. Please refer to Task control options for more information.
As for YAML pipeline, please make sure you have added continueOnError: false
to you task. Alternatively, make sure you haven't added condition: expression
to each task. Then, it defaults to Only when all previous task have succeeded.
Upvotes: 2