Hi,
I hope this message finds you well.
Pipeline Configuration:
Below is the relevant snippet of our pipeline configuration where the SonarCloud tasks are defined:
- task: SonarCloudPrepare@1
displayName: Prepare Sonar Analysis on SonarCloud
inputs:
SonarCloud: '######'
organization: '######'
scannerMode: CLI
configMode: manual
cliProjectKey: '$(REPO_CLI_PROJECT_KEY)'
cliProjectName: '$(REPO_NAME)'
cliSources: '.'
extraProperties: |
sonar.exclusions=/src/prisma/config/**
sonar.exclusions=**/*.spec.*
- task: SonarCloudAnalyze@1
displayName: Run Sonar Code Analysis
- task: SonarCloudPublish@1
displayName: 'Publicando Analise no SonarCloud'
inputs:
pollingTimeoutSec: '500'
Pipeline Log Context: Following the pipeline execution, here are some relevant excerpts from the log, with a little bit more context than before:
projectKey=#########
serverUrl=https://sonarcloud.io
serverVersion=8.0.0.53374
dashboardUrl=https://sonarcloud.io/dashboard?id=###########
ceTaskId=#############
ceTaskUrl=https://sonarcloud.io/api/ce/task?id=#############
##[debug][SQ] Waiting for task '#############' to complete.
##[debug][SQ] API GET: '/api/ce/task' with full URL "https://sonarcloud.io/api/ce/task?id=#############&additionalFields=warnings" and query "{"id":"#############","additionalFields":"warnings"}"
##[debug]Not using a proxy agent
##[debug]Agent environment resources - Disk: / Available 17306.00 MB out of 74244.00 MB, Memory: Used 696.00 MB out of 6932.00 MB, CPU: Usage 6.08%
##[debug][SQ] Task status:SUCCESS
##[debug][SQ] Task complete: {"id":"#############","type":"REPORT","componentId":"#############","componentKey":"#############","componentName":"#############","componentQualifier":"TRK","analysisId":"#############","status":"SUCCESS","submittedAt":"2024-03-15T19:21:50+0100","submitterLogin":"serv-azr-devops-sonar12697","startedAt":"2024-03-15T19:21:50+0100","executedAt":"2024-03-15T19:21:53+0100","executionTimeMs":2678,"logs":false,"hasScannerContext":true,"organization":"#############","warningCount":1,"warnings":["Shallow clone detected during the analysis. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to disable shallow clone."]}
##[debug]Retrieve Analysis id '#############.'
##[debug][SQ] API GET: '/api/qualitygates/project_status' with full URL "https://sonarcloud.io/api/qualitygates/project_status?analysisId=#############" and query "{"analysisId":"#############"}"
##[debug]Not using a proxy agent
##[debug]SONARQUBE_SCANNER_PARAMS={"sonar.host.url":"https://sonarcloud.io","sonar.token":***,"sonar.organization":"#############","sonar.projectKey":"#############","sonar.projectName":"#############","sonar.projectVersion":"1.0","sonar.sources":"/home/vsts/work/1/s","sonar.scanner.metadataFilePath":"/home/vsts/work/_temp/sonar/81795/#############/report-task.txt","sonar.typescript.lcov.reportPaths":"./coverage/lcov.info","sonar.exclusions":"**/*.png,**/*.ico,**/*.svg,**/*.ttf,node_modules/**,node_modules/**/*,**/node_modules/**,**/node_modules/**/*"}
##[debug][SQ] API GET: '/api/measures/component' with full URL "https://sonarcloud.io/api/measures/component?component=#############&metricKeys=new_violations%2Cnew_accepted_issues%2Cnew_security_hotspots%2Cnew_coverage%2Cnew_duplicated_lines_density" and query "{"component":"#############","metricKeys":"new_violations,new_accepted_issues,new_security_hotspots,new_coverage,new_duplicated_lines_density"}"
##[debug]Not using a proxy agent
##[debug]Error fetching component measures: Cannot read property 'measures' of undefined
##[debug]Unable to get measures. It is expected if you are not using a user token but instead a global or project analysis token.
##[debug][SQ] Publish task error: Cannot read property 'status' of undefined
##[debug]task result: Failed
##[error]Cannot read property 'status' of undefined
##[debug]Processed: ##vso[task.issue type=error;]Cannot read property 'status' of undefined
##[debug]Processed: ##vso[task.complete result=Failed;]Cannot read property 'status' of undefined
Thank you for your attention to this matter.
Tiago