Purpose and how to use GitHub plugin without CI system

129 views
Skip to first unread message

hector...@gmail.com

unread,
Mar 6, 2016, 10:52:48 AM3/6/16
to SonarQube
Hey guys,

I have a couple of questions. I'm writing my bachelor thesis and I would like to explain how to use the GitHub plugin for SonarQube in one of the chapters. I think I need some help because the official documentation does not provided enough information, and my investigation on the Internet has not been conclusive either. 

First of all, I would like to know whether I can only use this plugin in a continuous integration system (Jenkins in my case), or if I can use it in a different ray (manually, only with the SQ server) In other words, can I use this plugin by its own? Is it possible that SonaQube, or the plugin, detect  a new pull-request to a repository and launch the analysis, or it can do only the continuous integration system?

Also, I think I understand the following: I need a continuous integration system that detects when we receive a pull-request, and then launch the analysis SonarQube on modified files in the pull-request. In this way, it is possible to add the results  in the comments of pull-request, using GitHub plugin for SonarQube. Am I right? Did I understand it correctly?
The plugin function is only for add the results of analysis in comments of pull-request?

Finally, I wonder what the purpose of the plugin and in which scenarios I should use it. Is it possible to use it by its own or a continuous integration system is always required?


Thanks for your help!

G. Ann Campbell

unread,
Mar 7, 2016, 2:58:39 AM3/7/16
to SonarQube, hector...@gmail.com
Hi,

Have you tried any of this?


Ann



On Sunday, 6 March 2016 16:52:48 UTC+1:

hector...@gmail.com

unread,
Mar 7, 2016, 3:00:08 PM3/7/16
to SonarQube, hector...@gmail.com
Hi,

What is "this"?

I installed SQ server, and, I did an analysis with console writing the command, with Ant, and Maven, all it in publish mode with a local project.
but now I'm trying to understand the GitHub plugin for SQ.

I asked if it was made for use with CI system, or can I use it without CI system?
And i asked if the plugin only add comments in pull-request or it has another purpose more.

Thanks! :)

Julien Lancelot

unread,
Mar 8, 2016, 4:18:24 AM3/8/16
to hector...@gmail.com, SonarQube
Hi,

Have you looked at the document : http://docs.sonarqube.org/display/PLUG/GitHub+Plugin ?
At the end of the page, you have a real life example.

Regards,

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/abd05155-46ad-4055-922f-8eae865dc575%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Julien LANCELOT | SonarSource

hector...@gmail.com

unread,
Mar 8, 2016, 2:28:36 PM3/8/16
to SonarQube, hector...@gmail.com
Hi,

Of course, I have read several times that documentation, but does not give me all the information I need. I need something more extensive, not only an example of use.

First, I want to know if the plugin provides some functionality apart from adding comments on GitHub. Can it detect the pull-request automatically without CI system?
Can this be used productively without CI systems?

Moreover, is there any way to make an analysis of a project on GitHub, as if this degas local?

Thanks for all!

alexandr...@gmail.com

unread,
Mar 9, 2016, 9:10:29 AM3/9/16
to SonarQube, hector...@gmail.com
Hi,

Using the SQ GitHub Plugin without a CI in place makes no sense. That's the same if you just think about running classical code quality analysis. If this is not done automatically at least every day, it won't be efficient and you will see no enhancement of your code quality.

The idea is to setup a webhook on pull request. Each time a pull request is created, it will trigger a job on your CI system to run the analysis of your code in a mode that will not publish to SQ server but to GitHub by adding a comment to the PR.

I think you should try to setup it on your own to better understand how it works but in all cases you need a CI system.

hector...@gmail.com

unread,
Mar 12, 2016, 8:06:08 PM3/12/16
to SonarQube, hector...@gmail.com, alexandr...@gmail.com
Thanks, that is the answer that i need it.
Another question, Can I do it without webhook? or Can i use webhook into Jenkins installed in my notebook? I don't have any IP to configure webhook in GitHub website.

Thanks!

a...@tech-advantage.com

unread,
Mar 13, 2016, 11:06:41 AM3/13/16
to SonarQube, hector...@gmail.com, alexandr...@gmail.com
Beside all issues tracking and project-management specific features, you could replace GitHub by Gerrit and run the sonar-gerrit-plugin to achieve the same result.
The whole chain could live offline on your notebook : Jenkins, Gerrit and SQ.

Jenkins poll (or is notified by) Gerrit that a PR is waiting, builds it, triggers a SQ analysis which pushes its comments back to Gerrit.

Human action is then required on Gerrit to integrate the PR to the master branch.

Regards,
IG
Reply all
Reply to author
Forward
0 new messages