gabrie-allaigre / sonar-gitlab-plugin

Add to each commit GitLab in a global commentary on the new anomalies added by this commit and add comment lines of modified files
GNU Lesser General Public License v3.0
713 stars 207 forks source link

How to generate and see the analysis report when using this plug-in #176

Open rajeshhereforyou opened 5 years ago

rajeshhereforyou commented 5 years ago

Hi, I'm using sonarqube 6.3 and the corresponding plugin version (3.0) and trying to understand what are the next steps to generate the report and see the report. Please help me on this ASAP.

gabrie-allaigre commented 5 years ago

Hi, Do you use mvn, gradle, sonar scanner or other ?

rajeshhereforyou commented 5 years ago

I'm using gradle

rajeshhereforyou commented 5 years ago

HI, Can you please suggest me on this at the earliest.

gabrie-allaigre commented 5 years ago

have you looked in the issues? #57

Thanks

rajeshhereforyou commented 5 years ago

Thanks for sharing this. Let me try that. Meanwhile I've coupe of questions here.

  1. I want to first try this in my machine before deploying it onto the server. For this, How do i do this?
  2. I'm using TeamCity for build. Can you please suggest me how can i use this plugin with TeamCity?
rajeshhereforyou commented 5 years ago

Hi added all the necessary dependencies (for this plugin) to my gradle file and also added the plug-ins required for sonar integration and I can see the build is generating sonar results but I don't see this plugin generating any report in my GitLab.

I did the below configuration in SonarQube

  1. Setup GItlab URL
  2. Setup the User Token
  3. Setup the Global template

I'm running the below gradle command in my local ./gradlew sonarqube

Please suggest me if I'm missing anything.

rajeshhereforyou commented 5 years ago

I'm using the below template from #154 in my sonarQube --> Gitlab tab

https://github.com/gabrie-allaigre/sonar-gitlab-plugin/blob/master/templates/global/all-issues.md

rajeshhereforyou commented 5 years ago

Hi, In #57, you are referring to gitlab-ci.yml. I think this would be come into picture if we are using gitlabci for CI/CD but we are not using that.

so my question is, when i create a merge request for changes in Gitlab, how do I configure to enable this plugin to trigger the sonarqube analysis and report it back to Gitlab and show the details with the merge request.