Open rajeshhereforyou opened 5 years ago
Hi, I find the same situation, have you found any solution?
Hi there, I have been dealing with this issue some time ago.
There is one potential way how to solve this, check this thread: https://stackoverflow.com/questions/48907308/why-is-sonar-gitlab-plugin-not-sending-analyze-results-to-gitlab-as-a-comments-w?noredirect=1#comment85885601_48907308
I'm not however sure whether it works.
Another way how to solve this is having some of the Gitlab paid-for versions, to use Gitlab API called I think Gitlab pages. Or you can always use Gitlab runner instead of Jenkins.
Hope it helps and saves some time.
@gabrie-allaigre Hi, facing similar issue with another gitlab external CI(drone-ci). The sonarscanner analysis runs successfully with sonar-project.properties as
sonar.sourceEncoding=UTF-8
sonar.language=java
sonar.java.binaries=target/classes,target/test-classes
sonar.gitlab.project_id=11315201
sonar.gitlab.commit_sha=bce400f5bb21c5c2b4a0f682e353309875aaf13e
sonar.gitlab.ref_name=feature/IT-19
sonar.branch.name=feature/IT-19
And corresponding results are published to sonarqube(Tried with both 7.6/7.7 community). Plugin version 4.0, 4.0.1-snapshot, 4.1.0-snapshot.
In sonar server able to see logs like
2019.03.21 04:21:01 INFO ce[AWmeeuvpfejeH12FY31i][o.s.c.t.s.ComputationStepExecutor] Send issue notifications | newIssuesNotifs=0 | newIssuesDeliveries=0 | myNewIssuesNotifs=0 | myNewIssuesDeliveries=0 | changesNotifs=0 | changesDeliveries=0 | status=SUCCESS | time=3ms
2019.03.21 04:21:01 INFO ce[AWmeeuvpfejeH12FY31i][o.s.c.t.s.ComputationStepExecutor] Publish task results | status=SUCCESS | time=0ms
2019.03.21 04:21:01 INFO ce[AWmeeuvpfejeH12FY31i][o.s.c.t.s.ComputationStepExecutor] Trigger refresh of Portfolios and Applications | status=SUCCESS | time=0ms
2019.03.21 04:21:01 INFO ce[AWmeeuvpfejeH12FY31i][o.s.c.t.CeWorkerImpl] Executed task | project=niki-infra:gitlab-github-proxy | type=REPORT | id=AWmeeuvpfejeH12FY31i | submitter=rohit.verma@niki.ai | status=SUCCESS | time=9651ms
Configured sonar gitlab with access-token[all access granted]
But with all this, no sonar commits are published even when there are new code defects in sonar.
Please help, really want to get this functioning.
Hi,
Here is what I'm trying to achieve.
Whenever there is merge request created or change in a branch in GitLab, sonarqube should run the static code analysis and send that report back to Gitlab and display it there so that MR approver can see the report and take decision based on it.