-
Notifications
You must be signed in to change notification settings - Fork 6k
SonarQube jobs are not reporting code coverage #6092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey! I tried the next: a) Edited
b) Ran:
I tried it with a fresh new sonarqube container and so far it looks like it is working. Q: I'm not sure if that plugin declaration is defined elsewhere, I couldn't find it :( What do you think @jzheaux ??? PD: Happy thanksgiving day 🦃 |
Turns out the step a) is not needed, I just ran:
and got the coverage report shown again in a fresh new sonar container. Maybe what we were missing was telling sonar where the reports are located. I think we just need to edit the command in the Sonar step. As stated in My question is: what do we use wen calling the Sonar routine, Jenkinsfile or travis.yml? Knowing this I think I can submit a PR |
@raphaelDL wow, thanks for your extra research here! You are the man. We use Are you saying that when you run with Makes sense, just want to make sure we are on the same page. If so, then I think that is enough to submit a PR, yes. |
This commit ensures that jacocoTestReport task is called when running the Sonar stage. Additionally, a variable is passed instructing Sonar where to find the test result data. Fixes: spring-projectsgh-6092
Absolutely ¡, let's try it |
This commit ensures that jacocoTestReport task is called when running the Sonar stage. Additionally, a variable is passed instructing Sonar where to find the test result data. Fixes: gh-6092
This commit ensures that jacocoTestReport task is called when running the Sonar stage. Additionally, a variable is passed instructing Sonar where to find the test result data. Fixes: gh-6092
This commit ensures that jacocoTestReport task is called when running the Sonar stage. Additionally, a variable is passed instructing Sonar where to find the test result data. Fixes: gh-6092
I'm posting a comment here instead of the gradle-plugins repo, 'cause I think is more related with what we have in this project. Here's what I've found when the Jacoco plugin is applied coverage reports should be generated when calling We are preventing the reports being generated here: Line 24 in 7618d23
A quick read into the provided issue link suggests something about caching tests results, so in order to prevent report generation every time we call test or check it is decided to generate them only when needed, that's why we need to explicitly call the task Having a look at https://docs.gradle.org/5.0/release-notes.html it seems that now is solved. With the current gradle version 4.10.2 I removed that restriction and now I have the reports generated when I call Before the change I submitted we had in the Sonar stage what was going here? coverage data generated in the previous step (with Finally.... spoiler alert |
@raphaelDL Thanks for the updates! Would you like to submit a PR to fix this? |
Sure, just to be sure, in this pull request I would include: a) the deletion of the code that force us to call 🤔 |
Looks good to me @raphaelDL! Thanks :) |
I've submitted #6199 |
We haven't seen code coverage on our SonarQube analyses for a while.
The text was updated successfully, but these errors were encountered: