PDF related to sonar-runner in SonarQube - sonarqube

I have installed 3.7.4 Sonar server in my machine. And also installed PDF plugin in the server. I also installed sonar-runner-2.4. And run the sonar runner on java project. Now, I can see the metrics in WebInterface of Sonar server(by using localhost:9000). But, I need to generated PDF of this metrics. I unable to find where download option is available. Can any body help to move forward.
Note: PDF plugin is already installed

Related

How to migrate from Jenkins-core version 1.580.3 to 2.X

I have a jenkins plugin created with version 1.580.3 which is made to a hpi file and uploaded to jenkins.Now that I need to migrate to jenkins 2.X version I was not able to do that.Currently am using jenkins-core ,jenkins-war,jenkins-test-harness set to 1.580.3 .Now when I migrate to version 2.X I was able to correct my unit tests but my integration tests are failing saying null pointer exception .no class definition found error in JenkinsRule.class and FreeStylePrject.class when version is set to 2.0.
No links could save me.CAn someone guide me here?
Any help is appreciated
"No class definition found error" is most probably due to a missing plugin or an incompatible one with your 2.x version. Check in the update center (Manage Jenkins > Manage Plugins) on your Jenkins server if a compatible version of your 1.580.3 plugin is available.
When we are doing Jenkins upgrade, we always make a backup. Then we update the war file, update all compatible plugins and restore the backup if the upgrade is unsuccessful.

Sonarqube configuration in jenkins for windows

I am trying to integrate Sonarqube in Jenkins for windows.
I have installed Jenkins 2.138.2 and Sonarqube scanner plugin version 2.8.1
Also installed Sonarqube-7.3 and added it to path variable.
Below is my configuration in Jenkins:
Under "Global Tool Configuration", for SonarQube Scanner
installations - I have selected "Install automatically" and choose
"Install from Maven Central".
Under "Configure System", I have specified name and server url for
Sonarqube servers.
For the job, I have selected "Sonarqube analysis with Maven" under
post build action step(shows this is deprecated).
I am getting the below error.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
SonarQube analysis completed: FAILURE
Build step 'SonarQube analysis with Maven' changed build result to FAILURE
Build step 'SonarQube analysis with Maven' marked build as failure
Is there anything wrong with the configuration.
Edit: Added job configuration screenshots.
Downloading of sonarqube can be done form https://www.sonarqube.org/downloads/ where downloading can be done irrespective to the requirements(here, downloading of Developers Version ver 7.4 is done)
a. It will be downloaded in a zip format and will contain the sonarqube accessing file in various platforms, unzip the folder and extract all the files in your local system.
b. Download the sonarqube scanner, it is helpful cause, it is the only way to start the code analysis, it is the most required or can be said as default launcher to analyse project with SonarQube.
c. To start sonarqube, the start/open the startsonar.bat file.
d. The sonarqube can be runs in default 9000 port.
e. Launch sonarqube locally in the system.

How to use SCM Activity plugin in sonar for clearcase

Changed my sonar for scm activity from 3.7 to sonarqube 5.1.1 as it has in built in scm plugin.
Not getting what are the configurations needed to run that and what to pass in
setting->genral setting->scm->sonar.scm.provider
I found this link
http://maven.apache.org/scm/clearcase.html
and created a
URL:- scm:clearcase:baxi_view_4:clinical
Error
org.apache.maven.plugin.MojoExecutionException: SCM provider was set to "scm:clearcase:baxi_view_4:clinical" but no SCM provider found for this key. Supported SCM providers are git,svn
and what other changes or configuration needed in my code or is there anything i have to specify in pom.xml.
I am using jenkins and sonar Integration for CI and reports
You have to install ClearCase plugin for SonarQube. Since there is no official release download a SNAPSHOT from:
https://github.com/SonarCommunity/sonar-scm-clearcase/releases/download/1.0-rc1/sonar-scm-clearcase-plugin-1.0-SNAPSHOT.jar
Plugin documentation is here:
http://docs.sonarqube.org/display/PLUG/ClearCase+Plugin
Make sure to add sonar.scm.provider=clearcase into sonar.properties and re-run SonarQube analysis.
N.B.: We are waiting for positive feedback (on SonarQube Google group) before doing an official release since we do not have Clearcase instance for testing.
Install ClearCase plugin for SonarQube. Download and compile it from:
http://github.com/SonarCommunity/sonar-scm-clearcase
Make sure to add sonar.scm.provider=clearcase into sonar.properties and re-run Sonar analysis.
The machine which runs Jenkins should have ClearCase. And make sure Jenkins can run cleartool command from console.
Thanks #Julien H. - SonarSource Team
For running SonarQube with JRE 7:
From SonarQube page:
The SonarQube Java analyser is able to analyse any kind of java source files whatever is the version of Java they comply to. But SonarQube analysis and SonarQube server require some specific versions of the JVM to be executed.
We can install many JRE versions on our machine. For SonarQube, just set the JRE variable before run it.
Example on Linux
export JRE_1.7=/opt/jre_1.7
export PATH=$JRE_1.7/bin:$PATH
java -version
/opt/sonar/sonarqube-5.1.1/bin/sonar.sh start

SonarQube and Sonar runner installation in Jenkins

I have installed SonarQube-4.3 and Jenkins in my machine. To integrate Sonar with Jenkins installed the SonarQube plugin.
Do I need to install Sonar-runner in my machine in order to trigger a analysis through Jenkins?
You need SonarQube installed and running on same/different machine.
also you require SonarQube plugin in Jenkins which will connect SonarQube for Storing results.
Sonar-runner will be analyzer which will run analysis on your codebase.
You need to install sonar-runner on your local machine and have to specify its path in Jenkins system configuration.
Please find below the screenshots for detail purpose.

Unable to get sonar-fortify plugin configured with Jenkins and SonarQube

I have scoured the forums and cannot seem to quite understand the config for the fortify plug-in with Sonar.
I understand it simply builds a widget based on data from a previously generated .fpr file.
My setup:
Maven 3 project
Jenkins 1.606
SonarQube 5.0.1
Sonar-Fortify plug-in 2.0
Prerequisites:
.fpr file is in Jenkins workspace
Sonar is added to pom.xml
sonar-fortify-plug-in v2.0 added to pom.xml - (wasn’t sure this was needed or not)
Sonar server configured in Jenkins
sonar fortify plug-in v2.0 added to Sonar – (only see a dropdown to ‘enableReportLink’ under ‘Configure widgets’
should there be more config somewhere?
Questions:
Where should this property be set? Jenkins Sonar config, Sonar, pom file?
sonar-runner -Dsonar.fortify.reportPath=/path/to/project.fpr
Is that path to the .fpr file where it is within the Jenkins workspace?
The setup instructions on Github seem short and I feel I am missing something specific in my understanding.
Any help or direction to additional documentation is great appreciated.
First of all as documented version 2.0 can not be used anymore. Version 2.1 is going to be released soon. Vote for release will be started this week. Meanwhile you can:
download 2.1-SNAPSHOT version and copy it in extensions/plugins of your SonarQube server installation
restart server. The Fortify rules should be available in the page "Rules".
execute Fortify command "sourceanalyzer", independently from SonarQube. It generates a report file suffixed by .fpr.
execute a standard SonarQube analysis of your project by adding the property sonar.fortify.reportPath, for example:
mvn sonar:sonar -Dsonar.fortify.reportPath=/path/to/project.fpr
sonar-runner -Dsonar.fortify.reportPath=/path/to/project.fpr
If everything works, then you can automate these steps in Jenkins.

Resources