jenkins pipeline新增代码覆盖率检查
example
//Stage 2 : 单元测试
stage('Test'){
container('py3') {
//sh ("python run_unittest.py")
sh label: '', script: 'pylint ./servers/ -rn --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > pylint-report.txt|| exit 0'
sh ("coverage erase")
sh ("coverage run --branch --source=. run_unittest.py")
sh ("coverage xml -i")
//sh ("nosetests --with-xunit")
publishCoverage adapters: [coberturaAdapter(path: '*coverage*.xml', thresholds: [[threshold犀利士
Target: 'Aggregated Report']])], sourceFileResolver: sourceFiles('NEVER_STORE')
}