如何在Sonarqube Jenkins插件中指定正确的report-task.txt文件?
我正在对詹金斯的node.js项目进行Sonarqube分析。 Sonar Analysis创建了Report-task.txt文件。不幸的是,node_modules文件夹中的某些模块还包含其report-task.txt文件,该文件会导致jenkins发出警告:
WARN: Found multiple 'report-task.txt' in the workspace. Taking the first one.
/jenkins/workspace/.scannerwork/report-task.txt
/jenkins/workspace/node_modules/some_module/.scannerwork/report-task.txt
/jenkins/workspace/node_modules/some_other_module/.scannerwork/report-task.txt
一切都很好,直到我的项目的声纳分析失败:然后jenkins从模块中获取不同的report-task.txt文件。在node_modules中,由于声纳分析的结果:
WARN: Found multiple 'report-task.txt' in the workspace. Taking the first one.
/jenkins/workspace/node_modules/some_module/.scannerwork/report-task.txt <- wrong file
/jenkins/workspace/node_modules/some_other_module/.scannerwork/report-task.txt
有没有办法指定/jenkins/workspace/.scannerwork/report-task.task.txt
是唯一的正确结果文件,Jenkins应该忽略所有其他的其他所有其他结果。 ?最好使用詹金斯管道
I am running a SonarQube analysis of my Node.js project in Jenkins. Sonar analysis creates report-task.txt file with the result. Unfortunately some modules in the node_modules folder also contain their report-task.txt files which results in a warning in Jenkins:
WARN: Found multiple 'report-task.txt' in the workspace. Taking the first one.
/jenkins/workspace/.scannerwork/report-task.txt
/jenkins/workspace/node_modules/some_module/.scannerwork/report-task.txt
/jenkins/workspace/node_modules/some_other_module/.scannerwork/report-task.txt
Everything is fine until the Sonar analysis for my project fails: then Jenkins takes a different report-task.txt file from a module in node_modules as a result of a Sonar analysis:
WARN: Found multiple 'report-task.txt' in the workspace. Taking the first one.
/jenkins/workspace/node_modules/some_module/.scannerwork/report-task.txt <- wrong file
/jenkins/workspace/node_modules/some_other_module/.scannerwork/report-task.txt
Is there a way to specify that /jenkins/workspace/.scannerwork/report-task.txt
is the only correct result file and Jenkins should ignore all the other? Preferably using Jenkins Pipelines
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我的管道中的片段:
This is a snippet from my pipeline: