I'm using below command :
mvn --batch-mode verify sonar:sonar
-Dsonar.host.url=$SONAR_URL
-Dsonar.login=$SONAR_LOGIN -Dsonar.analysis.mode=preview
-Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.gitlab.project_id=$CI_PROJECT_ID
This creates a new pipeline stage and with mouseover it gives a summery of the scan.
But in sonar web dashboard it does not populate the data.
What needs to be done to publish the data in the web dashboard too?
Try without -Dsonar.analysis.mode=preview
: as mentioned in SonarQube 7.6: Analysis Parameters (and in this answer):
sonar.analysis.mode
Deprecated since SQ 6.6 This parameter is set to preview as part of non-Developer Edition PR decoration.