sonarqube 8.9.2 with tfs 2015 build integration - is it posible? - tfs

I'm using sonarqube 8.9.2 and TFS2015 update 4.
in 8.9.2 there is no c# plugin as it's built-in.
when trying to run the sonarqube step of the build I get an error saying the SonarQube.MSBuild.Runner.Implementation.zip is missing.
##[error]Could not find a file on the SonarQube server. Url: http://XXXXXXXXXX/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
2021-09-02T14:34:22.7202456Z ##[error]Failed to update the SonarQube MSBuild Runner 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.
2021-09-02T14:34:22.7202456Z ##[error]Pre-processing failed. Exit code: 1
2021-09-02T14:34:22.7360027Z ##[error]Unexpected exit code received from batch file: 1
the only thing I can find in the configuration is the Azure DevOps configuration in the ALM section but I'm using a local TFS 2015.
I've seen this post and the relevant answer but in 8.9 there is no C# plugin - Not able to integrate TFS 2015 with SonarQube
is it possible to integrate?
p.s,
I tried working with an older version of sonarqube (7.9.X) only to find there are issues with compatibility.
I installed v9 only to find that there is a bug in the latest releases and it will not start.
getting sick of this and starting to think I need to build a script that will run it manually.
thanks for your help,
Shay

Related

TFS 2017 + Sonarqube

We have a on prem installation of TFS (TFS 2017) and I am attempting to integrate SonarQube analysis into our build steps. I have installed the SonarQube extension on the TFS server and added a service endpoint to point to a server where I have SonarQube Server installed and configured.
When I attempting to trigger a build, I am getting an error "No agents could be found with the following capabilities: msbuild, java, visualstudio". Does my build server need JRE to be installed to get the SonarQube build steps to work? SonarQube website says this:
**Installation
Make sure the .NET Framework v4.5.2+ is installed
Make sure the Java Runtime Environment 8 is installed
Install the extension from the marketplace**
Both the error message and the documentation told you the same thing: You need Java installed.
I will be the third source of confirmation: You need Java installed.
First, the official document is very clear here: Make sure the Java Runtime Environment 8 is installed
Besides, according to your prompting error message:
No agents could be found with the following capabilities: msbuild,
java, visualstudio
You are also lacking msbuild, visualstudio. Not only need Java installed, but also need Visual Studio installed on your build agent, then restart the build agent. Restarting the build agent will capture the added Capabilities. If this not work, reconfigure the build agent should do the trick.
The build agent will not detect the environment changes after you installed it. It will only detect during the installation. If you are using vNext build agent, also try to manually add some capabilities in Settings- Agent Queues- Agent Pool - Agent- Capabilities. After this trigger the build again.
Note: if you are running on TFS earlier than 2017 Update 2, you will need to download and manually install the latest 3.x version of the VSIX to install SonarQube Extension.

Incompatibility issue between TFS 2017 Extension 4.0.2, Sonarquebe Server 6.3 and Plugin C# 6.6.0.3969

We are working on the migration of TFS 2015 towards TFS 2017.
We update the new SonarQube extension (4.0.2) as well as the plugin on the server for C # code (sonar-csharp-plugin-6.6.0.3969).
We are checking that the definitions of the builds with the previous tasks of sonarqube (Sonarquebe for MSBuild-Begin Analysis and SonarQube for MSBuild-End Analysis) continue to work correctly, and then we can make a modification and update plan for the new tasks proposed by the extension.
We encountered a problem when generating the build .:
## [error] The C # plugin installed on the SonarQube server is not compatible with the SonarQube analysis agent (i.e. the MSBuild.SonarQube.Runner.exe, or the build automation task). Either check the compatibility matrix or get the latest versions for both.
2018-03-19T17: 15: 08.2276942Z ## [error] Pre-processing failed. Exit code: 1 "
Does anyone know how I can solve this error?
Based on the compatibility matrix sonar-csharp-plugin-6.6.0.3969 is not compatible with SonarQube extension (4.0.2) (Scanner for MsBuild 4.0.2)
Please see the Compatibility - SonarCloud Extension for TFS-VSTS and Compatibility - SonarQube C# plugin for details.
In your scenario, you can try below ways to fix that:
Install the latest plugin for C# code:
sonar-csharp-plugin-6.8.2.4717 (SonarC# 6.8.2 – Feb 26, 2018 –
SonarQube 6.7+ (Compatible with LTS))
Alternatively replace the current Scanner for MsBuild 4.0.x with the old
version 3.0.0.629. You can download Scanner for MsBuild from
here.

SonarQube VSTS Marketplace Extension

I downloaded the extension from
https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube#review-details,
for TFS 2015 on premise, installed it in my collection and created and end point. Then I configured 2 steps as indicated before and after my build, I am getting the following error
[error]The MSBuild.SonarQube.Runner executable could not be found. Check that the build definition includes a SonarQube Pre-Build step
My sonar server Version is 5.6.3 running on Linux fedora. Do I need to install any other tools? I understand that The SonarQube Extension embeds its own version of the SonarQube Scanner for MSBuild. The first step before the build executes correctly, the build succeed but the end step fails.
Thanks in advance for your help

Jenkins Automation help required

I have been assigned a task to do build automation using jenkins which should perform checkout, compile & build automatically.
Existing set up - Currently we have PVCS installed in one of our AIX server where build process(checkout,compile,build) is automated using ant script.
I have installed jenkins in my windows server.
How do i get the code into my windows server from PVCS which resides in AIX server to perform build through jenkins.
Thanks in advance.
As I posted on CodeRanch where you posted the same question, you need to install the PVCS plugin for Jenkins.

Jenkins configuration: can't see "MSBuild SonarQube Runner" section

I can see this part in my local installed Jenkins server, but can't find it in my company's Jenkins servers. What's missing to make it show? The SonarQube Runner and Sonar sections are there.
The Compatibility section tells only supported by C# plugin 4.4 onwards:
http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+MSBuild.
So the solution is upgrade the C# plugin in SonarQube.

Resources