We are very interested in leveraging the GitHub integration on my team: http://docs.sonarqube.org/display/PLUG/GitHub+Plugin
We use Jenkins as our CI Server and already have the GitHub Pull Request Builder working there. We have also been using SonarQube for analysis but have not had much luck with the preview or incremental modes and GitHub integration. Current versions are SonarQube 5.1.1 and GitHub Plugin version 1.0.1.
We have the plug-in installed on SonarQube and have our GitHub Enterprise API configured. We have attempted using the SonarQube Runner in Jenkins and Maven to get this to work following the travis.sh
script as a guide:
https://github.com/SonarSource/sonarqube/blob/master/travis.sh
We see the Sonar integration show up on GitHub, but it is always successful (we are working with large, legacy code bases and expect to see a lot of output).
The thing that is consistent between our javascript and java analysis is that we don't seem to be getting any files indexed and the GitHub Plugin InputFile Cache sensor is used instead of Javascript or Java sensors we are used to seeing during a full analysis.
00:01:57.532 13:12:31.109 INFO - 0 files indexed
00:01:57.533 13:12:31.110 INFO - 25784 files ignored because of inclusion/exclusion patterns
00:01:57.535 13:12:31.112 INFO - Quality profile for js: Sonar way
00:01:57.758 13:12:31.334 DEBUG - 'SCM Sensor' skipped in preview mode
00:01:57.758 13:12:31.335 DEBUG - 'CPD Sensor' skipped in preview mode
00:01:57.759 13:12:31.336 DEBUG - Sensors : Lines Sensor (wrapped) -> GitHub Plugin InputFile Cache
00:01:57.759 13:12:31.336 INFO - Sensor Lines Sensor (wrapped)
00:01:57.759 13:12:31.336 INFO - Sensor Lines Sensor (wrapped) (done) | time=0ms
00:01:57.759 13:12:31.336 INFO - Sensor GitHub Plugin InputFile Cache
00:01:57.759 13:12:31.336 INFO - Sensor GitHub Plugin InputFile Cache (done) | time=0ms
00:01:57.759 13:12:31.336 DEBUG - No previous analysis, skipping issue tracking
00:01:57.763 13:12:31.340 INFO -
00:01:57.763
00:01:57.763 ------------- Issues Report -------------
00:01:57.763
00:01:57.763 No file analyzed
00:01:57.763
00:01:57.763 -------------------------------------------
00:01:57.763
00:01:57.763
00:01:57.763 13:12:31.340 INFO - Export issues to /data/jenkins/workspace/mygea-mygeaviation-pullrequests/.sonar/sonar-report.json
00:01:57.766 13:12:31.343 INFO - ANALYSIS SUCCESSFUL
00:01:57.767 13:12:31.344 DEBUG - Post-jobs : GitHub Pull Request Issue Publisher
00:01:57.767 13:12:31.344 INFO - Executing post-job class org.sonar.plugins.github.PullRequestIssuePostJob
Are we missing something simple?
Analysis properties are as follows:
sonar.projectKey=mygea-ux-pullrequests
sonar.projectName=mygea-ux-pullrequests
sonar.projectVersion=1.0.0
sonar.sourceEncoding=UTF-8
sonar.language=js
sonar.sources=./
sonar.verbose=true
sonar.exclusions=static/ge_ux/**/*, node_modules/**/*, custom-login/custom-login-cfm/iids/**/*, custom-login/custom-login-honda/iids/**/*, custom-login/custom-login-ge/iids/**/*, static/ge.com.2013/components/**/*, static/ge.com.2013/widgets/**/*.min.js, testFiles/**/*, coverage/**/*, gulpfile.js, test-tmp/**/*, extend.js, index.js, static/ge.com.2013/js/**/*.min.js
sonar.analysis.mode=preview
sonar.issuesReport.console.enable=true
sonar.forceUpdate=true
sonar.github.pullRequest=$ghprbPullId
sonar.github.repository=mygea/mygeaviation
sonar.github.login=*****
sonar.github.oauth=*****
sonar.github.endpoint=*****
Any assistance on this would be much appreciated! This is an awesome plug-in and we think it will really help us get our technical debt under control.
Josh