sonarqube-scan

SonarQube analysis mode: preview vs issues

故事扮演 提交于 2019-12-04 03:16:56
问题 Which are the key differences between these preview and issues modes of SonarQube (greater than 5.2) analysis? Considering http://docs.sonarqube.org/display/SONAR/Concepts the main differences between publish and preview is that preview reports only issues (no measures) and no report is pushed back to the SonarQube server; this idea is clear. But what about issues ? It is written that issues is the same as preview , but should be used only for tools development. I'm a little confused, what do

Sonar - Unable to load component class org.sonar.scanner.scan.ProjectLock

不打扰是莪最后的温柔 提交于 2019-12-03 23:45:47
I have some issues while running Sonar on my netbeans' project. It's not working and i have the following error : C:\Users\remy.fischer\Desktop\NetBeansProjects\NetBeansProjects\BinPacking\sonar-scanner-3.0.3.778-windows\bin>sonar-scanner -Dsonar.projectKey=..... -Dsonar.projectName=... INFO: Scanner configuration file: C:\Users\remy.fischer\Desktop\NetBeansProjects \NetBeansProjects\BinPacking\sonar-scanner-3.0.3.778-windows\bin\..\conf\sonar-s canner.properties INFO: Project root configuration file: NONE INFO: SonarQube Scanner 3.0.3.778 INFO: Java 1.8.0_121 Oracle Corporation (64-bit) INFO:

What is the difference between jacoco branch coverage and Sonar condition coverage?

左心房为你撑大大i 提交于 2019-12-03 18:17:30
I'm trying to analyze java code with the SonarQube Scanner (version 3.1.0.1141). SonarQube version : 5.6.6 Sonar Java plugin version : 4.12.0.11033 jacoco version : 0.8.0 I have filled the sonar-project.properties with those properties : # Sonar sources and metadata sonar.language=java sonar.sources=src/main sonar.java.source=1.8 sonar.sourceEncoding=UTF-8 sonar.java.binaries=target/classes sonar.java.libraries=target/lib sonar.tests=src/test sonar.java.coveragePlugin=jacoco sonar.junit.reportsPath=target/surefire-reports sonar.surefire.reportsPath=target/surefire-reports While jacoco report

Using waitForQualityGate in a Jenkins declarative pipeline

浪子不回头ぞ 提交于 2019-12-03 13:53:17
问题 The following SonarQube (6.3) analysis stage in a declarative pipeline in Jenkins 2.50 is failing with this error in the console log: http://pastebin.com/t2ja23vC. More specifically: SonarQube installation defined in this job (SonarGate) does not match any configured installation. Number of installations that can be configured: 1. Update: after changing "SonarQube" to "SonarGate" in the Jenkins settings (under SonarQube servers, so it'll match the Jenkinsfile), I get a different error: http:/

Unknown stage section “withSonarQubeEnv”

ぃ、小莉子 提交于 2019-12-03 12:36:42
问题 I am experimenting using Pipeline jobs with the Blue Ocean beta plugin enabled on our Jenkins server. We have a sonarqube scanner build step configured in one of our freestyle jobs, which I now want to add a stage for in my Jenkins file. I see from the sonar docs there is a way to achieve this here We are using Jenkins 2.32.3 and have SonarQube scanner 2.8 installed. I tried the suggested stage config block, where our scanner is named 'SonarQube Scanner' stage('SonarQube analysis') { //

SonarQube upgrade from 6.4 to 6.5 breaks the scanner

Deadly 提交于 2019-12-03 11:54:38
I am on sonarQube6.4 and have upgraded to 6.5 Sonar-scanner is 3.0.3 Now after the upgrade the scanner fails anytime there is a java file in the source path. If I don't scan java files everything works just fine. However If I rollback an use 6.4 version, everything works fine, so is there any regression? This is the stack trace, when I run the scanner command with -X command. So is it a mandate in 6.5 to provided the location of all compiled classed, is there a way to ignore it. 04:56:21.218 DEBUG: Sensors : JavaSquidSensor -> SurefireSensor -> JaCoCoSensor -> SonarJavaXmlFileSensor ->

How to react on SonarQube Quality Gate within Jenkins Pipeline

我只是一个虾纸丫 提交于 2019-12-03 03:18:55
Within my Jenkins Pipeline I need to react on the SonarQube Quality Gate. Is there an easier way to achieve this but looking in the Sonar-Scanner log for the result page (e.g. https://mysonarserver/sonar/api/ce/task?id=xxxx ) and parse the JSON Result from there? I use Jenkins 2.30 and SonarQube 5.3 Thanks in advance Based on Vincent's answer, and using Pipeline utility steps , here's my updated version that worked for me (using sonarscanner report file) : withSonarQubeEnv('SONAR 6.4') { sh "${scannerHome}/bin/sonar-scanner" sh "cat .scannerwork/report-task.txt" def props = readProperties file

Unknown stage section “withSonarQubeEnv”

百般思念 提交于 2019-12-03 03:00:34
I am experimenting using Pipeline jobs with the Blue Ocean beta plugin enabled on our Jenkins server. We have a sonarqube scanner build step configured in one of our freestyle jobs, which I now want to add a stage for in my Jenkins file. I see from the sonar docs there is a way to achieve this here We are using Jenkins 2.32.3 and have SonarQube scanner 2.8 installed. I tried the suggested stage config block, where our scanner is named 'SonarQube Scanner' stage('SonarQube analysis') { // requires SonarQube Scanner 2.8+ def scannerHome = tool 'SonarQube Scanner 2.8'; withSonarQubeEnv('SonarQube

SonarQube: Coverage on New Code never calculated

时光总嘲笑我的痴心妄想 提交于 2019-12-02 11:47:58
问题 I have set up SonarQube, Maven and Cobertura to upload unit test coverage at every build run. I want to use the differential views to get coverage for the delta (new code only). The coverage itself is successfully uploaded, and I can see the delta in lines of code. However, I can't get the "Coverage on new Code" to work. I tried different values for the leak period, including previous_analysis and previous_version (changing the version from 1.0 to 1.1 in the new analysis). I also used -Dsonar

Where is the new SonarQube Gradle Plugin?

喜欢而已 提交于 2019-12-02 09:49:39
问题 Having recently upgraded from a previous version of Gradle, I started getting a warning that I should use the official SonarQube plugin: The 'sonar-runner' plugin has been deprecated and is scheduled to be removed in Gradle 3.0. please use the official plugin from SonarQube (the docs). From that link, I was directed to the Gradle Plugins page for the new plugin (https://plugins.gradle.org/plugin/org.sonarqube), which tells me to use: buildscript { repositories { maven { url "https://plugins