警告插件已被弃用并由警告下一代插件取代。等效功能称为质量门。
如果自上次成功构建以来出现新问题,则使用质量门类型“NEW”(阈值为 1 )会使构建失败。
如果使用管道,此阶段将解析结果,如果存在新的 lint 故障,则会失败。
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']]
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1027 次 |
| 最近记录: |