I’m trying to implement the newer way to handle Pull Requests with SonarQube 7.7. I think we have everything setup properly but for some reason the Check in Github is stuck on Queued.
These are the related parameters that I have from the sonar context:
Global server settings:
- sonar.pullrequest.github.endpoint=https://github.optum.com/api/v3
- sonar.pullrequest.provider=GitHub
- sonar.alm.github.app.id=50
- sonar.alm.github.app.name=SonarQubePRChecks
- sonar.alm.github.app.privateKey.secured=******
Project scanner properties: - sonar.projectName=SonarTools-UI
- sonar.projectVersion=#2
- sonar.pullrequest.base=master
- sonar.pullrequest.branch=PR-9
- sonar.pullrequest.github.repository=sonartools/Sonartools-React-JS-Frontend
- sonar.pullrequest.key=9
- sonar.pullrequest.provider=github
And yes my branch name is actually PR-9
We have the GitHub Application setup thats called SonarQubePRChecks and its showing up correctly as far as I know.
When I create my pull request the build gets kicked off in Jenkins and my other type of checks:
continuous-integration/jenkins/pr-merge
continuous-integration/jenkins/branch
They get kicked off and have “This commit looks good”
But on the Checks tab it shows SonarQubePRChecks Queued xx minutes ago
I’m not sure where to start on troubleshooting for this. I don’t see anything in the Jenkins logs about PR decorations.
I do see:
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=55ms
and
INFO: Pull request 9 for merge into master from PR-9
From this page:
https://docs.sonarqube.org/7.7/analysis/pull-request/
- (For GitHub Enterprise) Specify your pull request provider, create a GitHub App and configure your SonarQube instance, and set your GitHub parameters.
Specify your pull request provider:
sonar.pullrequest.provider=github
INFO: SCM provider for this project is: git
create a GitHub App: Named SonarQubePRChecks
configure your SonarQube instance:
- sonar.pullrequest.github.endpoint=https://github.optum.com/api/v3
- sonar.pullrequest.provider=GitHub
- sonar.alm.github.app.id=50
- sonar.alm.github.app.name=SonarQubePRChecks
- sonar.alm.github.app.privateKey.secured=******
set your GitHub parameters.
- sonar.pullrequest.base=master
- sonar.pullrequest.branch=PR-9
- sonar.pullrequest.key=9