Symlinks problem when using Concourse with Windows worker


(swetha) #1

Description
Running Sonar scanner via Concourse fails with path issues

Repro steps
Create pipeline using Concourse. Run the analysis on Windows with Concourse. Scanner fails to find files due to symlink issue. Concourse symlinks the source repository to containers/live. This causes the analysis to fail with referenced file erros

Expected behavior
The analysis path to the file is the same as the sonar output

Actual behavior
File paths do not match.

INFO: Importing results from 6 proto files in 'D:\concourse\containers\containers\00002657kgj\tmp\build\b27bb238\source-git.sonarqube\out\0\output-cs'
WARNING: WARN: File 'D:\concourse\containers\volumes\live\4c6444de-0791-481f-7dd8-f70df6d9e920\volume\src\netcore2_api_template\Controllers\ValuesController.cs' referenced by the protobuf 'MetricsInfo' does not exist in the analysis context
WARNING: WARN: File 'D:\concourse\containers\volumes\live\4c6444de-0791-481f-7dd8-f70df6d9e920\volume\src\netcore2_api_template\Program.cs' referenced by the protobuf 'MetricsInfo' does not exist in the analysis context
WARNING: WARN: File 'D:\concourse\containers\volumes\live\4c6444de-0791-481f-7dd8-f70df6d9e920\volume\src\netcore2_api_template\Providers\CustomValueProvider.cs' referenced by the protobuf 'MetricsInfo' does not exist in the analysis context
WARNING: WARN: File 'D:\concourse\containers\volumes\live\4c6444de-0791-481f-7dd8-f70df6d9e920\volume\src\netcore2_api_template\Startup.cs' referenced by the protobuf 'MetricsInfo' does not exist in the analysis context

Known workarounds
None

Related information

SonarScanner for MSBuild 4.3.1
Using the .NET Core version of the Scanner for MSBuild
Default properties file was found at C:\Users\concourse.dotnet\tools.store\dotnet-sonarscanner\4.3.1\dotnet-sonarscanner\4.3.1\tools\netcoreapp2.1\any\SonarQube.Analysis.xml
Loading analysis properties from C:\Users\concourse.dotnet\tools.store\dotnet-sonarscanner\4.3.1\dotnet-sonarscanner\4.3.1\tools\netcoreapp2.1\any\SonarQube.Analysis.xml
Post-processing started.
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
INFO: Scanner configuration file: C:\Users\concourse.dotnet\tools.store\dotnet-sonarscanner\4.3.1\dotnet-sonarscanner\4.3.1\tools\netcoreapp2.1\any\sonar-scanner-3.2.0.1227\bin..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\concourse\containers\containers\00002657kgj\tmp\build\b27bb238\source-git.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_151 Oracle Corporation (64-bit)
INFO: Windows Server 2012 R2 6.3 amd64
INFO: SONAR_SCANNER_OPTS=-Xmx1024m
INFO: User cache: C:\Users\concourse.sonar\cache
INFO: SonarQube server 7.0.0