We are using SonarQube Enterprise Edition 8.1
From the TFS 2015, i’m running Prepare sonarqube analysis task and complete the SonarQube analysis task.
My build is PR(Pull Request) build which is giving the following error at complete analysis task.
ERROR: Error during SonarQube Scanner execution
ERROR: The preview mode, along with the 'sonar.analysis.mode' parameter, is no more supported. You should stop using this parameter.
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
16:53:04.906 Creating a summary markdown file...
16:53:04.921 Post-processing failed. Exit code: 1
System.Exception: Unexpected exit code received from batch file: 1
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeBatchScriptCmdlet.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
Fetching code analysis issues and posting them to the PR...
System.Management.Automation.RuntimeException: Could not find the SonarQube issue report at E:\SCagent\_work\196\.sonarqube\out\.sonar\sonar-report.json. Unable to post issues to the PR. ---> System.IO.FileNotFoundException: Could not find the SonarQube issue report at E:\SCagent\_work\196\.sonarqube\out\.sonar\sonar-report.json. Unable to post issues to the PR.
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken)
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)
******************************************************************************
Finishing task: SonarQubeScannerMsBuildEnd
******************************************************************************
System.Exception: Task SonarQubeScannerMsBuildEnd failed. This caused the job to fail. Look at the logs for the task for more details.
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource)