* sonarqube code coverage * v 7.18.0 * 7.19 * code coverage plugin changes * add coverage to microservices * remove empty plugin blocks * add jacoco to pluginManagement for micro * fix unit test assertion * cleanup --------- Co-authored-by: Christopher Gross cogross <[email protected]> Co-authored-by: Joe Alphonso <[email protected]>
SonarQube
Start SonarQube
In docker/sonarqube directory, run:
docker-compose up -d
Setup SonarQube
go to https://localhost:9000 to view the sonarqube app admin/admin is the default password (change it when you first access it)
How do you want to create your project? Manually
Set project name to DataWave (leave project key as DataWave) Set main branch to integration Click Set Up
How do you want to analyze your repository? Locally
Leave the token name as "Analyze DataWave" Set the expiration to Never Expires Click Generate
Copy the token (spq_...), save it locally in a file called sonarqubeToken in your home directory.
Click Continue
Click Maven
Create a sonar.sh script, add it to your ~/bin dir (or anywhere that is on your configured path)
mvn clean verify && mvn -e sonar:sonar -Dsonar.projectKey=Datawave -Dsonar.host.url=http://localhost:9000 -Dsonar.login=<TOKEN>
Run the new sonar.sh script in your checked out datawave repository. When it is done, return to the browser and you can see the results of your scan.
Stop SonarQube
In docker/sonarqube directory, run:
docker-compose stop
You should do this before closing down for the day, or if you are done trying to do analysis.