我有一个checkstyle阶段,创建一个flake8报告并使用警告发布者。当我运行构建时,我得到以下错误。
我已经安装了"静态分析收集器插件"同样。
withEnv(["VIR_ENV=$env.WORKSPACE/venv"]){
stage ('Check_style') {
sh """
#. venv/bin/activate
export PATH=${VIRENV}/bin:${PATH}
echo $PATH
make flake8 | tee test-report/flake8.log || true
"""
step([$class: 'WarningsPublisher',
parserConfigurations: [[
parserName: 'Pep8',
pattern: 'report/flake8.log'
]],
unstableTotalAll: '0',
usePreviousBuildAsReference: true
])
}
}
错误: -
Build failed with Error: java.lang.IllegalArgumentException: Could not instantiate {delegate={$class=WarningsPublisher, parserConfigurations=[{parserName=Pep8, pattern=report/flake8.log}], unstableTotalAll=0, usePreviousBuildAsReference=true}} for CoreStep(delegate: