Must-share information
SonarQube community edition version 8.8 (build 42792)
how is SonarQube deployed: Jenkins
Hello everyone
I’m trying to run sonarqube analisys with Jenkins
We use multi scm project, and since sonarqube doesn’t support multi scm analisys(with scm integration), i’m trying to run it on certain repo
Our project consists of folders, so basicly it looks like
- jenkins_folder
|-- workspace
–|-- sonarqube
–|–|-- project 1 (repo 1)
–|–|–|-- .git
–|–|–|-- files to analyse
–|–|-- project 2 (repo 2)
–|–|–|-- .git
–|–|–|-- files to analyse
Analisys run in root folder by default and i get “root Not inside a Git work tree”
So I decided to run analisys on project 1 and set sonar.projectBaseDir=/jenkins_folder/workspace/sonarqube/project 1
And I got error:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar (default-cli) on project: Not inside a Git work tree: C:\jenkins_folder\workspace\sonarqube
And in logs there is:
[INFO] Base dir: C:\jenkins_folder\workspace\sonarqube
So setting projectBaseDir doesn’t work, it’s still root folder and I can’t get what to do about it
Tell pls, what am I doing wrong, and how to solve this problem