The warning plugin is deprecated and replaced by the Warnings Next Generation plugin. Equivalent functions are referred to as quality gates.
Use the Quality Gate type "NEW" with a threshold value of 1 to complete the build if new problems have occurred since the last successful build.
If pipelines are used, this step will analyze the results and fail if a new line failure is detected.
stage('lint') { steps { // ..generate eslint report, other types are supported by the plugin... } post { always { // record lint issues found, also, fail the build if there are ANY NEW issues found recordIssues enabledForFailure: true, blameDisabled: true, tools: [esLint(pattern: 'checkstyle-results.xml')], qualityGates: [[threshold: 1, type: 'NEW']] } } }
source share