Open jeoy opened 5 years ago
I observe same issue, sonar-gitlab-plugin@4.0.0 and sonarQube@7.1,
I recently ran into this issue and found that it was because of a mismatch between the branch name being given to Sonarqube and the ref_name argument.
Try using these two arguments -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.branch.name=$CI_COMMIT_REF_NAME
.
I recently ran into this issue and found that it was because of a mismatch between the branch name being given to Sonarqube and the ref_name argument.
Try using these two arguments
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.branch.name=$CI_COMMIT_REF_NAME
.
Hi , george, I can't use the arguments Dsonar.branch.name
you mentioned, I am using Community Edition. Does sonar branch relate gitlab branch ?
I recently ran into this issue and found that it was because of a mismatch between the branch name being given to Sonarqube and the ref_name argument. Try using these two arguments
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.branch.name=$CI_COMMIT_REF_NAME
.Hi , george, I can't use the arguments
Dsonar.branch.name
you mentioned, I am using Community Edition. Does sonar branch relate gitlab branch ?
It looks that it's limitation of community edition. Analysis is run only on master branch. Too bad....
Yup, unfortunately you won't be able to analyze multiple branches on the community edition and I believe the Gitlab Issues come from the branches issues even if the quality gate works... I don't think anything can be done about this w/o upgrading.
@jeoy . Why don't you try open source branch plugin: https://github.com/msanez/sonar-branch-community I installed it, and it work for me with other branch than master
@jeoy . Why don't you try open source branch plugin: https://github.com/msanez/sonar-branch-community I installed it, and it work for me with other branch than master
This plugin is deprecated !
@jeoy . Why don't you try open source branch plugin: https://github.com/msanez/sonar-branch-community I installed it, and it work for me with other branch than master
This plugin is deprecated !
In the docs it links to the current version of the plugin. It seems to be maintained and supposedly works with version 7.4+. I can't test it out myself, but would this work?
I has installed the sonar-branch-community plugin. But I still has the same issue as you. Have you solved the problem? If you can give me some advice , I will be grateful.
@jeoy . Why don't you try open source branch plugin: https://github.com/msanez/sonar-branch-community I installed it, and it work for me with other branch than master
Hi, Do your Gitlab VERSION is Commuity Edition? I have installed the same plugin, But it doesn't work .Could you please help me?
Oh! I got some tips. If I do not analyze my primary branch(master) by sonarqube. It will occur no issue. But if I do it , other branchs will return master branch's report,like this. and it still has no inline comment.
So I think it should be the community edition branch function leads to it.
I am using sonar-gitlab-plugin@4.0.0 and sonarQube@7.5,
My gitlab-ci.yml is:
Commit in non-master branch
If this commit not on the![commit in non-master branch](https://i.stack.imgur.com/AWJBL.png)
Master
branch, when quality gate is failed, SonarQube always generates global comment like below:Commit in Master branch
However, commit in
Master
branch (with same changes), it generates global comment with issues and inline comments :I expect it generates global comment with issues and inline comment on all branch.
Any help would be appreciated!