How would I install Sonar in my existing Jenkins - ant

I would like to integrate Sonar Qube in my Existing Jenkins Set Up(Build Script in ANT).Please do help me in doing it
Mike

The easiest and recommended way would be to use SonarQube Jenkins Plugin. The documentation explains the process quite nicely and there is an option to run Standalone analysis, which is not dependent on your build process...

Related

How to add Sonarqube into Jenkins

I have installed sonar and jenkins. Now I want to add Sonarqube into Jenkins. But in the manage plugins, it doesn't show me the Sonarqube.the display I get
SonarQube is a standalone server. It offers a web user interface to visualize bugs, code smells and vulnerabilities. You cannot include this web-ui SonarQube in Jenkins.
However, you can trigger a scan as part of your Jenkins job. This scan can "send" its findings into a SonarQube installation - either hosted by your own (on-premise), or using the hosting offer at sonarcloud.io.
There are a couple of different ways to include the scanner in your job, but the setup is specific to your programming language and build tools (Maven, VisualStudio, command line, ...). Check the sonarcloud docs for the way, that fit's best to your situation.

how to publish klocwork results on sonarqube

We are running both: Klocwork for C++ and SonarQube for Java and C# projects as a CI process using Jenkins. Since the SonarQube dashboard is much better, I would like to publish Klocwork results on the SonarQube.
Is it possible using some kind of Jenkins plugin? Any other option?
There is a SonarQube plugin for Klocwork available on this updated page: www.emenda.com/klocwork-sonarqube-plugin
You will need to complete the request form on the web page in order to obtain the resource.
To publish Klockwork results in SonarQube you need not a Jenkins plugin but a SonarQube plugin. There appears to be one but I have no experience with it, and the screenshots on the site are quite old.
If you don't have any luck with it, another option would be to develop your own plugin. If you decide to go that route, you can post specific plugin development questions to the SonarQube Google Group.

Automate configuration of Jenkins & Sonarqube

I am trying to find a solution to automate installation and configuration of Jenkins & SonarQube. The idea is to provide an easy to use provisioning utility for setting up CI. Ideally I would love to automate the following
Installation
Set up users,Build, Unit testing and Code coverage
Is there an SDK, CLI or similar which can be used from batch script?
Thanks
You can use the Jenkins docker image for the installation part - even if you're not using Docker you can still copy the installation procedure:
https://github.com/jenkinsci/docker
For the setup of jobs I would recommend the Job DSL:
https://github.com/jenkinsci/job-dsl-plugin
For the rest you can use the Jenkins CLI or you can manually configure it once and then extract the corresponding XML file from the Jenkins home and copy it into other installations.

Setting up gradle org.sonarqube plugin sonar analysis task (sonarqube) in jenkins

As per the recent announcement on Gradle forum, the Sonar Plugin and Sonar Runner Plugin are being deprecated in favor of the SonarQube plugin. Can someone share any links (documentation or blogs) that demonstrate setting this up in Jenkins. I tried this on the local setup and gradle sonarqube task works great.
Should we continue to use the "Invoke Standalone Sonar Analysis" (from Jenkins-Sonar plugin) build step in a freestyle Jenkins job? With the default settings, it doesn't infer mandatory information like sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources from the build.gradle file. To provide it manually for a multi-module project is painful (particularly for sonar.libraries and sonar.binaries). One could think to generate a sonar-project.properties file as part of a custom gradle task that will subsequently be used by the Standalone Sonar analysis step.
However, it seems that this a generic requirement and I feel that there might be a simpler way out in in the Jenkins-Sonar plugin. Could someone familiar with the Jenkins-Sonar Plugin shed some light on it?
System info:
Gradle 2.5
Jenkins 1.560
SonarQube 4.5
SonarQube Gradle Plugin 1.0
Sonar Runner 2.3
Jenkins Sonar Plugin 2.2
JDK 1.8
Linux 2.6
Thanks in advance!
EDIT:
I did not want to put the database username and password of the remote sonarqube instance in my gradle build file and hence don't want to use the existing 'sonarqube' task.
I think that you are referring to the following improvement that we want to do on the Jenkins SonarQube plugin: SONARJNKNS-217
This should come sooner or later. In the meantime, you're right, there's no easier way than what you described - unfortunately.

How to integrate parasoft soatest with Jenkins

Is it possible to integrate Parasoft SOA webservices test with Jenkins?
I have a soatest project created to test my webservices. I would like it to automate running soatest scripts through Jenkins in each build. Is there any possible way we can perform this task?
I hope you guys can understand the question
Thank you in advance!
You can use soatestcli to run tests in a Jenkins shell or batch build step, if your licence allows that. The normal syntax is
soatestcli -data absolutePathToYourWorkspace -config 'user://YourTestConfigurationName' -resource YourProject/YourTestFile.tst -report .
You can also use the HTML Publisher plugin or DocLinks plugin to publish your report.html to Jenkins.

Resources