SonarQube fails to get git blame information from Jenkins project

我与影子孤独终老i 提交于 2019-12-06 10:35:43

You can setup an analysis job which is triggered by P.

The analysis job can take a parameter which repository inside of the workspace of P should be analysed. The job itself should use the same workspace as P and only call the SonarQube analysis.

Based on @CSchulz's answer I found the solution using SonarQube module

I configured SonarQube to use two submodule corresponding to my A and B git projects. Each project get the name of git module as the important projectBaseDir parametre.

sonar.projectKey=P
sonar.projectName=P
sonar.projectVersion=4.0.0
sonar.binaries=.

sonar.cxx.includeDirectories=Common/Path
sonar.cxx.cppcheck.reportPath=cppCheckReport.xml # Reports are present in A and B forlder

#  2 modules definition
sonar.modules=A,B

# Module A
IHM.sonar.projectBaseDir=A
IHM.sonar.projectName=A
IHM.sonar.sources=.
IHM.sonar.cxx.includeDirectories=XXX

# Module B
Shares.sonar.projectBaseDir=B
Shares.sonar.projectName=B
Shares.sonar.sources=.
Shares.sonar.cxx.includeDirectories=XXX

I needed to figure out some configurations but it works and it is fine for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!