Open Veranicus opened 6 years ago
Hi, Have you a log and command line ? Thanks
Hi there, I'm doing everything inside Jenkins with SonarQube scanner for Jenkins plugin installed and then on a server where is SonarQube installed in options as I have posted in images before.
I don't know what do you mean by log and a command line exactly ?
log for mvn sonar:sonar ....
I don't know where to find a log for mvn sonar:sonar. The way I have it configured is that I have a job in jenkins that is analysing my repositories on gitlab with sonarqube, this job is triggered by a webhooks for push and merge events. It works perfectly, now I want to put analyse results in form of a comments to a gitlab, so I have your plugin installed, everything configured like inside of your documentation. I have already posted my gitlab config to you, now I have also enabled and added CI pipeline to my gitlab repo, it looks excatly as in your documentation:
Now it started several times, hovewer not in a times it should have, not after push or merge event but right after I added the pipeline and then it was just pending all the time and was saying it needs gitlab runner to start the pipeline... I don't know what I'm doing wrong. The only thing I want is after the job in jenkins is triggered, it analyse the project and after this analysis it posts the outcome of analysis to a gitlab, thank you.
Hi, If use gitlab-ci, log in pipeline job.
Can I somehow do it without using gitlab-ci ? Perhaps somehow only with a jenkins ? I don't want to be using another slave for gitlab-ci. Thank you.
And by the way, do I need gitlab enterprise edition to do anything with this plugin ?
I use gitlab ce and sonarqube ce only. Plugin work. Plugin work with gitlab-ci, jenkins and others
Could you please post me some screenshots of how exactly can you configure it with gitlab ce and sonarqube ce only ? Thank you very much.
Hi Guys, Further to this discussion. I am only using Gitlabs for Repo management and SonarQube for result analysis. Can someone guide me how do I send/see these results on Gitlabs (without using much different tools). Is there a proper procedure to configure seeing Sonarqube analysis results? Will if I add/delete/push a file on Gitlabs, will it then run Sonarqube analysis on its own and results will follow? Thanks, Nikhil
Hi, all, @gabrie-allaigre The same issue to me, i have read the documentation, but I didn't find out how to integrate it with jenkins. Is there an example use with Jenkins pipeline? Now i use sonar with jenkins pipeline code as following(dont know how to use this plugin with jenkins、mvn sonar scaner):
withSonarQubeEnv('SonarQube') {
withCredentials([string(credentialsId: 'sonarToken', variable: 'sonarToken')]) {
sh "cd ${buildScriptPath} && mvn sonar:sonar -Dsonar.host.url=$sonarHost -Dsonar.login=$sonarToken"
}
}
Hi there, I currently have a jenkins job that is triggered when push or commit is made within a gitlab project with the use of a configurated webhooks. Everything works fine and projects are analyzed when they're supposed to with SonarQube scanner for maven method, the problem is I want to then push SonarQube to analyze results to a given project in form of global or inline comments. So I have installed on my sonarQube server Sonar Gitlab plugin. Problem is it's not making those comments with results.
I have used default templates for global and inline comments as are stated in plugin documentation.
I haven't added any other configuration in connection with this except the ones I have stated in my post, thanks.
I'm linking images to each part of my gitlab configuration in SonarQube Server:
SonarQubeConfig1 - The gitlab name is direct https link directly to a repository :
SonarQubeConfig2 - FreeMarker syntax configuration in global and inline comments is directly from the default template which you can find in Sonar Gitlab Plugin documentation:
SonarQubeConfig3
Thank you.