I’m trying to configure SonarQube Community EditionVersion 7.2.1 (build 14109) with TFS 2015 update 4. I’m doing this in my lab. The SonarQube server is a Bitnami VM. TFS is on another VM. I downloaded version 3.1 of the SonarQube extension and added it to TFS.
I created a SonarQube endpoint and added a Name, URL, and the token and clicked OK. I then navigated to the build definition in TFS and add two build steps, SonarQube for MSBuild - Begin Analysis and SonarQube for MSBuild - End Analysis. When I try to edit the SonarQube Endpoint in the step definition, There is nothing in the drop-down box. It remains yellow and I can’t add it.
I found an article online that said I could create it as a Generic type. I was able to add it with the following entries.
I called it generic, gave it the url of http://192.168.1.103 username was blank and password/token was my sonarqube token.
I no went back to the build definition to add the sonarqube steps. This time the Endpoint drop-down had the choice of generic which is what I called the endpoint. For Project Key and Project Name I called them msbuild-example. I then save the definition and got no errors.
I get the following error during the build:
Starting task: Fetch the Quality Profile from SonarQube
Executing the powershell script: C:\Agent\tasks\SonarQubePreBuild\1.0.35\SonarQubePreBuild.ps1
SonarQube Scanner for MSBuild 1.1
Default properties file was not found at C:\Agent\tasks\SonarQubePreBuild\1.0.35\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml
Preparing working directories…
Checking for updates…
Could not find a file on the SonarQube server. Url: http://192.168.1.103/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
Failed to update the SonarQube Scanner for MSBuild binaries. Check the server url, verify that the C# plugin is correctly installed on the SonarQube server and that the SonarQube server has been restarted.
Pre-processing failed. Exit code: 1
Unexpected exit code received from batch file: 1
Finishing task: SonarQubePreBuild