Closed rompic closed 9 years ago
As a first step I have copied an adapted version of the run-sonar.sh file on the jenkins server and run it from there.
I have not done it yet but personally I would proceed by adding a Shell step in a daily/weekly build (not more). And this Shell step will basically run the same command line as I do when I run it manually : run-sonar.sh (at the root of the project).
I would not copy run-sonar.sh or sonar-project.properties, or modify it for this purpose. But this assumes you put those files at the root of your project (and in your SCM).
Just a question then: what is the issue with the plugin? What would you suggest to change to make it possible? The documentation, or the plugin itself?
As the run-sonar.sh file does not contain any project specific logic, I think that it makes sense to manage it in a centralized way. What's more, I thought about a way to manage the sonar properties in: But as the script reads the paths etc. from the properties file, this may not be possible at the moment.
I'm not to sure what you mean by "problem with the plugin".
ok, I think I understand your question.
You are right that given current plugin architecture, you cannot use Sonar Jenkins plugin directly (cf your screenshot). And this won't change on a short term because this plugin is what we can call a "tactical plugin" (lots is done via external tools).
But I can understand your needs to put run-sonar.sh on a central place to avoid any copy/paste across projects. If this is not working, I am willing to fix it. Have you tried having run-sonar.sh on a central place and sonar-project.properties in each project root directory? Does it work?
If it works I propose to close this issue. Otherwise we keep it to make run-sonar.sh run from a shared place.
i managed to change the script a little (actually I just switch into the directory and changed the include a little).
if you can, it would be great if you can make a pull request with your change, I am sure it can benefit other users.
Thanks!
we literally just changed the include path, i don't think there is anything of value here...
Any ideas about how to harness the sonar runner of jenkins sonar plugin to run the analysis? I'm thinking about putting the sonar.properties in the jenkins job.