Hi everyone. Hoping someone can help with the issue we have below:
Repository: GitHub
CI: Jenkins
Scanner Command:
./sonar-scanner
-Dsonar.token=****-Dsonar.pullrequest.key=23412 \
-Dsonar.pullrequest.branch=web/fix/JIRA-1000-task-name \
-Dsonar.pullrequest.base=staging/base-branch \
-Dsonar.qualitygate.wait=true-Dsonar.python.coverage.reportPaths=server-coverage.xml \
-Dsonar.javascript.lcov.reportPaths=coverage/client1/lcov.info, ...
-Dsonar.python.xunit.reportPath=server-test-report.xml
-Dsonar.python.flake8.reportPaths=server-flake8-report.txt
Languages Used: python, javascript
Error Observed:
- We have PR checks implemented in the GitHub repo that prevents merge unless the sonar analysis is green lit
- The GitHub repo is bound to the sonar repository through the repo binding
- The PR decorations are working properly, but the PR check is forever stuck on “SonarCloud Code Analysis Expected— Waiting for status to be reported”
- The scan result is PASSED in both our jenkins pipeline step (we wait for qualitygate result) and on SonarCloud side. It just doesn’t update the GitHub check
- This does not happen always. There are some PRs that gets green lit with no issues. But we are facing a growing number of PRs that are getting stuck like this with no resolution other than to re-trigger the entire pipeline and hope it works this time
One note is that the scanner step above runs on Jenkins as part of the last step in our continuous-integration/jenkins/pr-merge test pipeline (since we need its test reports to send along with the scanner). As a result, if we don’t set “SonarCloud Code Analysis” as required, the above SonarCloud check doesn’t show up until the pipeline hits that pipeline step (not sure how relevant this information is)
Has anyone come across this and know how to resolve/debug this issue. Any help would be appreciated
