Below is the yaml file and error we are facing,
2024-08-09T12:06:23.9204209Z ##[section]Starting: SonarQubeAnalyze
2024-08-09T12:06:23.9210465Z ==============================================================================
2024-08-09T12:06:23.9210856Z Task : Run Code Analysis
2024-08-09T12:06:23.9211088Z Description : Run scanner and upload the results to the SonarQube server.
2024-08-09T12:06:23.9211329Z Version : 6.3.2
2024-08-09T12:06:23.9211551Z Author : sonarsource
2024-08-09T12:06:23.9211814Z Help : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
[More Information](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarqube-extension-for-azure-devops/)
2024-08-09T12:06:23.9212336Z ==============================================================================
2024-08-09T12:06:24.1123067Z ##[warning]Error while executing SonarQube:Analyze task: ENOENT: no such file or directory, chmod '/home/vmuser-uls/myagent/_work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/6.3.2/sonar-scanner/bin/sonar-scanner'
2024-08-09T12:06:24.1136215Z ##[error]ENOENT: no such file or directory, chmod '/home/vmuser-uls/myagent/_work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/6.3.2/sonar-scanner/bin/sonar-scanner'
2024-08-09T12:06:24.1148131Z ##[section]Finishing: SonarQubeAnalyze
Yaml
stages:
- stage: Build
jobs:
- job: Build
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '8.x'
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: SonarQubePrepare@6
inputs:
SonarQube: 'sonarqube'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: **'
cliSources: '**'
- script: |
docker build -t $(acrLoginServer)/$(imageName):$(imageTag)-$(DATE_TAG) .
displayName: 'Build Docker Image'
- task: SonarQubeAnalyze@6
inputs:
jdkversion: 'JAVA_HOME'
- task: SonarQubePublish@6
inputs:
pollingTimeoutSec: '300'