javamachr / 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
125 stars 24 forks source link

which version is support sonarqube 8.9? #21

Closed YuJian95 closed 2 years ago

YuJian95 commented 2 years ago

hello friend! I would be very grateful if you could let me know that which version is support sonarqube 8.9.

jkroepke commented 2 years ago

I'm using 5.1.2 for 8.9 LTS and it works fine.

YuJian95 commented 2 years ago

I'm using 5.1.2 for 8.9 LTS and it works fine.

thank you for your answer, I have another question, Is it(version 5.1.2) support Issues mode (Preview)? I have try to do that for some day. my ci-gitlab.yml config in behind .

I want to add sonarqube result to comment in gitlab when I start a pull request. btw, i have add the branch plugin(1.8.1)

branch_code_analysis:
  stage: branch_code_analysis
  script:
    - mvn clean install -Dmaven.test.skip=true
    - mvn sonar:sonar
      -Dsonar.host.url=sonar_url
      -Dsonar.login=sonar_token
      -Dsonar.projectKey=$CI_PROJECT_NAME
      -Dsonar.pullrequest.key=$CI_MERGE_REQUEST_IID
      -Dsonar.pullrequest.branch=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
      -Dsonar.pullrequest.base=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
      -Dsonar.pullrequest.gitlab.repositorySlug=$CI_PROJECT_ID
      -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
      -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
      -Dsonar.gitlab.project_id=$CI_PROJECT_PATH
      -Dsonar.gitlab.comment_no_issue=true -X
      -Dsonar.analysis.mode=preview
  tags:
    - mavenrunner02
jkroepke commented 2 years ago

No idea, we have developer edition. Preview mode does not exists in sonarqube.

javamachr commented 2 years ago

Preview mode was removed in Sonarqube 7.7. This fork is for Sonarqube >= v8.6. If you need older version of sonar(that for example includes preview mode) you have to use original version that I forked.

YuJian95 commented 2 years ago

@jkroepke @javamachr Thank you very much.