Languages of the repository - C#, JavaScript, T-SQL
Error observed - see below
Steps to reproduce - Unclear. Every build seems to have this issue suddenly.
Potential workaround - Unclear.
We have a number of repositories - all of which use SonarCloud as part of their Jenkins pipelines. They are all various versions of .NET (framework, core, standard, etc). Yesterday, we noticed an error with one of the builds. I thought it might have been a fluke, or something specific to that repository. This morning, more builds are failing with the same error on sonarscanner end:
E:\jenkins_build_nodes\build01\workspace\PR-12336bd916f>dotnet sonarscanner end /d:sonar.login="****"
SonarScanner for MSBuild 5.7.2
Using the .NET Core version of the Scanner for MSBuild
Post-processing started.
Calling the SonarScanner CLI...
The SonarScanner did not complete successfully
10:58:43.341 Post-processing failed. Exit code: 1
script returned exit code 1
This started happening randomly at some point yesterday. Looks like last successful build was at 11:00am or so. All builds run on the same box. I am continuing to investigate internally but as this totally prevents us from proceeding with any builds or merging any PRs, I figured I’d ask for help from the experts.
I’ve tried adding /d:sonar.verbose to the command for more info but not getting much:
E:\jenkins_build_nodes\build01\workspace\main172fbb05>dotnet sonarscanner end /d:sonar.login="****" /d:sonar.verbose=true
SonarScanner for MSBuild 5.7.2
Using the .NET Core version of the Scanner for MSBuild
Default properties file was found at C:\Tools\.store\dotnet-sonarscanner\5.7.2\dotnet-sonarscanner\5.7.2\tools\net5.0\any\SonarQube.Analysis.xml
Loading analysis properties from C:\Tools\.store\dotnet-sonarscanner\5.7.2\dotnet-sonarscanner\5.7.2\tools\net5.0\any\SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Post-processing started.
13:26:47.162 Using environment variables to determine the download directory...
13:26:47.195 13:26:47.193 Uninstalling target: E:\jenkins_build_nodes\build01\workspace\main172fbb05\.sonarqube\bin\targets\SonarQube.Integration.targets
13:26:47.196 13:26:47.195 This setting is not valid in the "end" phase in this version of the C# plugin: sonar.verbose
13:26:47.196 Post-processing failed. Exit code: 1
So I enabled verbose logging but I also realized there was an elastic agent deployed to the box two days back around the time our builds started failing. Perhaps it messed with a dependency or something. We uninstalled it and things started working. I’m going to dig deeper to try to ascertain the root cause… for now I’m still confused.