sonarqube-scan

configure sonar in bamboo

孤人 提交于 2019-12-01 02:10:02
I want to add a build step in Bamboo in order to analyze code using sonarqube. I do not want to use any plugin like Sonar for Bamboo but wondering if it is possible to write a script as a build step in order to run sonar. I have downloaded sonarqube on our build server and it is up and running having logged in as admin. When I had setup locally, I installed sonar scanner and generated the MSBuild script which I ran from the project root folder but since it is a build server and I do not have the source code on the server I can't do that and I exploring the ways it can be integrated with Bamboo

Sonarqube v.4 TFS task “Publish Analysis Result” throw error “Could not fetch metrics”

馋奶兔 提交于 2019-11-30 20:21:37
On TFS, I am not being able to run the taks "Publish Analysis Result" to publish Quality Gate on TFS web page. The other tasks "Prepare analysis on SonarQube" and "Run Code Analysis" runs successfully. The error messages are: [error][SQ] Could not fetch metrics [error][SQ] Could not fetch task for ID 'FWK9NiOFibiMfA2L0BHo' Despite the error message, when I access the url http://localhost:9000/api/ce/task?id=FWK9NiOFibiMfA2L0BHo I get a json response with the task information. Seems it's an issue with the SonarQube VSTS Extensions: The SonarQube extension uses basic authentication to

configure sonar in bamboo

故事扮演 提交于 2019-11-30 20:06:10
问题 I want to add a build step in Bamboo in order to analyze code using sonarqube. I do not want to use any plugin like Sonar for Bamboo but wondering if it is possible to write a script as a build step in order to run sonar. I have downloaded sonarqube on our build server and it is up and running having logged in as admin. When I had setup locally, I installed sonar scanner and generated the MSBuild script which I ran from the project root folder but since it is a build server and I do not have

Automatically derive mandatory SonarQube properties from pom file in Jenkins

蓝咒 提交于 2019-11-30 12:17:24
Situation: I want to analyze my project with SonarQube (5.4) triggered by Jenkins (1.642.4). It is a java project build with maven. I see two ways to trigger the analysis: Post Build Action "SonarQube analysis with maven" but it's deprecated , so I don't want to use it Post Build Step "Execute SonarQube Scanner", is the recommended way. Problem: If I use the deprecated Post Build Action, the properties for sonar project configuration are derived automatically from the project pom. It I use the recommended Post Build Step, I receive the Exception You must define the following mandatory

SonarQube MSBuild Scanner doesn't exclude files from analysis

和自甴很熟 提交于 2019-11-30 09:09:09
We are currently using SonarQube Scanner for VSTS/TFS 4.1.1 (which is using SonarQube Scanner 4.1.1). What we want to do: For some projects (modules) in our solution we want to exclude files from the analysis and from the code coverage statistics. This should be done in a maintainable way by using file patterns and not modifying the TFS Build task. Project structure: |- Source |- ProjectA |- Scripts (should be excluded) |- OwnCode |- ProjectB |- Views (only code coverage should be excluded) |- Presenters |- ... |- ProjectC |- Scripts (should be scanned) |- ... |- ... |- Solution.sln What we

Sonarqube scan error with line out of range?

元气小坏坏 提交于 2019-11-30 08:28:15
[07:43:57]W: [Step 1/1] ERROR: Error during SonarQube Scanner execution [07:43:57]W: [Step 1/1] ERROR: Line 523 is out of range in the file src/main/java/com/company/package/File.java (lines: 522) For some reason Sonarqube is reporting an error on line 523 but there is only 522 lines in the source file ? I saw this on a previous file, but when I added a blank line to the end of it the problem went away, this file already has a blank line at the end of it. I had the same issue when using sonar maven plugin and jacoco test reports. mvn sonar:sonar relies on an existintig jacoco report, when the

Sonarqube v.4 TFS task “Publish Analysis Result” throw error “Could not fetch metrics”

╄→尐↘猪︶ㄣ 提交于 2019-11-30 03:57:09
问题 On TFS, I am not being able to run the taks "Publish Analysis Result" to publish Quality Gate on TFS web page. The other tasks "Prepare analysis on SonarQube" and "Run Code Analysis" runs successfully. The error messages are: [error][SQ] Could not fetch metrics [error][SQ] Could not fetch task for ID 'FWK9NiOFibiMfA2L0BHo' Despite the error message, when I access the url http://localhost:9000/api/ce/task?id=FWK9NiOFibiMfA2L0BHo I get a json response with the task information. 回答1: Seems it's

Automatically derive mandatory SonarQube properties from pom file in Jenkins

旧城冷巷雨未停 提交于 2019-11-29 18:03:04
问题 Situation: I want to analyze my project with SonarQube (5.4) triggered by Jenkins (1.642.4). It is a java project build with maven. I see two ways to trigger the analysis: Post Build Action "SonarQube analysis with maven" but it's deprecated , so I don't want to use it Post Build Step "Execute SonarQube Scanner", is the recommended way. Problem: If I use the deprecated Post Build Action, the properties for sonar project configuration are derived automatically from the project pom. It I use

Sonarqube scan error with line out of range?

会有一股神秘感。 提交于 2019-11-29 11:38:03
问题 [07:43:57]W: [Step 1/1] ERROR: Error during SonarQube Scanner execution [07:43:57]W: [Step 1/1] ERROR: Line 523 is out of range in the file src/main/java/com/company/package/File.java (lines: 522) For some reason Sonarqube is reporting an error on line 523 but there is only 522 lines in the source file ? I saw this on a previous file, but when I added a blank line to the end of it the problem went away, this file already has a blank line at the end of it. 回答1: I had the same issue when using

sonar-maven-plugin:3.1.1:sonar analyze error after upgrade to SonarQube 6.0

心已入冬 提交于 2019-11-29 07:09:35
We just upgraded to SQ 6.0 and now some projects get the following error when analyzing with maven: [INFO] --- sonar-maven-plugin:3.1.1:sonar (default-cli) @ gitlab-hook-dispatcher --- [INFO] User cache: C:\Users\frank.jakop\.sonar\cache [INFO] Load global repositories [INFO] Load global repositories (done) | time=94ms [INFO] User cache: C:\Users\frank.jakop\.sonar\cache [INFO] Load plugins index [INFO] Load plugins index (done) | time=5ms [INFO] SonarQube version: 6.0 [INFO] Default locale: "de_DE", source code encoding: "UTF-8" [INFO] Process project properties [INFO] Load project