Our sonarcloud yaml build has started to fail constantly on the SonarCloudAnalyze step with the only error shown below
We’re using the following yaml to build :
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
name: $(majorVersion).$(minorVersion).$(Year:yy)$(DayOfYear).$(rev:r)
pool:
vmImage: 'windows-2022'
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
majorVersion: '1'
minorVersion: '8'
targetStagingDirectory: '$(Build.ArtifactStagingDirectory)/develop'
solution: '**/Solution.sln'
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
sourceDirectory: $(Build.SourcesDirectory)
stages:
- stage: Build
displayName: 'Build and Test the API Projects'
jobs:
- job: BuildJob
displayName: 'Build API'
steps:
- task: DotNetCoreCLI@2
displayName: 'Restore'
inputs:
command: 'restore'
projects: $(solution)
feedsToUse: 'config'
nugetConfigPath: 'nuget.config'
verbosityRestore: 'Normal'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: '***)'
organization: '***'
scannerMode: 'MSBuild'
projectKey: '***'
projectName: '***'
extraProperties: |
sonar.exclusions=**/obj/**,**/*.dll
- task: DotNetCoreCLI@2
displayName: 'Build the project - $(buildConfiguration)'
inputs:
projects: '$(solution)'
arguments: '--configuration $(BuildConfiguration) --no-restore /p:Version=$(Build.BuildNumber) /p:SolutionDir=$(sourceDirectory)'
- task: DotNetCoreCLI@2
displayName: 'Run unit tests - $(buildConfiguration)'
inputs:
command: test
projects: '$(solution)'
arguments: '--configuration $(BuildConfiguration) --no-build /p:SolutionDir=$(sourceDirectory)'
- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
Any help would be greatly appreciated