I transferred my work from one Hudson machine to Wednesday with several Jenkins subordinates, and now JaCoCo coverage no longer works.
JOB (old): Hudson 2.0.1, Jenkins Sonar Plugin 1.7.1, Sonar 2.1.2
BROKEN (new): Jenkins 1.446, Jenkins Sonar Plugin 1.7.2, Sonar 2.1.2
My Hudson job is called Pinnacle, and it was used to run on the same Hudson server with Sonar on the same machine. I created my (NO MAVEN) build by doing the following.
1) Added Ant target in my build.xml called test-with-coverage
2) Configured the Pinnacle job in Hudson to "invoke standalone sonar analysis" with these properties:
sonar.projectKey=com.skyboximaging:pinnacle sonar.projectName="Pinnacle" sonar.projectVersion=1.0 sources=Pinnacle/src/java tests=Pinnacle/test/java binaries=Pinnacle/classes sonar.jacoco.reportPath=Pinnacle/jacoco.exec sonar.jacoco.antTargets=test-with-coverage
(Note that the code is uploaded to the Pinnacle directory in the Jenkins workspace.)
3) Configured “general settings” sonar to use JaCoCo to cover code
Everything worked beautifully!
But in the new Jenkins environment, I see this error in the output of the Jenkins assembly:
23:15:17.863 INFO Sensor JaCoCoSensor... 23:15:17.868 INFO Project coverage is set to 0% as no JaCoCo execution data has been dumped: /var/lib/jenkins/workspace/Pinnacle/Pinnacle/jacoco.exec
This file does not exist on the slave where the assembly was performed. (The directory / var / lib / jenkins / workspace / Pinnacle / Pinnacle exists.)
All other sensors (FindBugs, PMD, etc.) work fine. Just JaCoCo is broken.
Does Sonar / JaCoCo support multiple Jenkins subordinate environments?
I suspect the Ant test-with-coverage
task is not starting. How does Sonar find build.xml? And what is different from the old and new installation?