Sonarqube Server: 6.7.7 LTS (Upgraded from 6.7 LTS)
Env: EC2, t2.large | Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-1088-aws x86_64)
Projects Run for Analysis: Java | Spring boot
SonarJava: 5.13.1 (build 18282)
I updated the Sonarqube server from 6.7 LTS to 6.7.7 LTS a few days ago. Everything went well and the update was successful.
Actual way of updating:
- Upgraded the server in the traditional way. Download the sonarqube set-up, paste it in a folder.
- Stop the old version, copy the configs. Start the server from the new folder
- Once started, the sonarqube will ask for DB migration tapping on OK, the DB migration completes and sonarqube will become live.
- After the update, I’m not able to see the code coverage for the projects that are run newly.
- This means I was able to see the code coverage for a project and I ran the Jenkins job to update the code coverage. Now, the code coverage is showing 0%.
- I can see locally on my machine that the code coverage is more than 50%. But not on the SonarQube server.
Solutions tried so far:
- I thought the sonar properties are not set correctly and did some tweaks. - NO HELP
- I thought changing the project key will resolve the problem - NO HELP
- I thought of setting up SonarQube on my local machine and run the analysis - VOILA, CODE COVERAGE WAS SHOWN.
- Just to make sure again, I ran a project which had a Code coverage of about 30% on the EC2 instance (where I’m having the problem) - Code coverage turned to 0%. Ran the same job on my local machine, code coverage showed as 30%
I’m unable to find the root cause for this since if it was a DB migration problem, all the projects should have been 0% regardless of the analysis was done prior to server update or later.
Please enlighten me to resolve this problem.