Open smurugesh1686 opened 5 years ago
sonar.analysis.mode=publish
Which version of SonarQube Server do you have? I heard that sonar.analysis.mode
property had become deprecated since 6.6 version
i have solve the problem,jenkins Prepare SonarQube Scanner environment must be true
What does
jenkins Prepare SonarQube Scanner environment must be true
mean? Where did you set it?
Jenkins -Configure - will be 'Tick' upon the sonarqube configuration
but that didn't solve my problem
I'm getting the same problem. I have following setup.
Job - BestPracticeScan
Repository structure
Vendor1/
Vendor2/
Vendor3/
Under Vendor2/
Project/
Project/sonar-project.properties
Project/src
My file sonar-project.properties
contains
sonar.projectName=My Nice Project
sonar.projectVersion=main
sonar.sources=src/
sonar.java.binaries=src/
sonar.java.source=1.8
In Jenkins job configuration I set
Path to project properties Vendor2/Project/sonar-project.properties
Build fails with
ERROR: The folder 'src/' does not exist for 'my.only.project' (base directory = /var/jenkins_home/workspace/BestPracticeScan)
I'm surprised, why base directory is not where the file sonar-project.properties
is located.
Then I update the job configuration adding Additional arguments
projectBaseDir=Vendor2/Project
Now it fails and without -X
no clue what is happening.
ERROR: Error during SonarScanner execution
ERROR: Tasks support was removed in SonarQube 7.6.
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
ERROR: SonarQube scanner exited with non-zero code: 2
-X
was added into Additional arguments.
And now I'm getting
19:09:33.968 ERROR: Error during SonarScanner execution
Tasks support was removed in SonarQube 7.6.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 2
Finished: FAILURE
Then I was desperate and populated into Analysis properties everything from the file sonar-project.properties
with the path from project home
sonar.projectKey=my.only.project
sonar.projectName=My Nice Project
sonar.projectVersion=main
sonar.sources=Vendor2/Project/src/
sonar.java.binaries=Vendor2/Project/src/
sonar.java.source=1.8
It started to work. Even I remove everything. The problem was, that SonarQube Scanner could not create the file
/var/jenkins_home/workspace/BestPracticeScan/Vendor2/Project/.scannerwork/report-task.txt
Deleted the file and reverted everything back to initial problem.
Then, just moved projectBaseDir=Vendor2/Project
from Additional arguments to Analysis properties as sonar.projectBaseDir=Vendor2/Project
everything started to work from the first run with message
19:11:42.482 DEBUG: Report metadata written to /var/jenkins_home/workspace/BestPracticeScan/Vendor2/Project/.scannerwork/report-task.txt
There is a problem, but if do everything right (in not documented way, though) it will work.
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
We are using sonarscanner 2.8.1 In analysis properties: sonar.analysis.mode=preview sonar.sources=modules. But in Console: INFO: ANALYSIS SUCCESSFUL INFO: Executing post-job GitHub Pull Request Issue Publisher INFO: ------------------------------------------------------------------------ INFO: EXECUTION SUCCESS INFO: ------------------------------------------------------------------------ INFO: Total time: 1:22.184s INFO: Final Memory: 238M/11718M INFO: ------------------------------------------------------------------------ WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
How to resolve this issue.