Thanks for the reply Colin. I made some progress with your help, but I am still running into issues with the SonarCloudAnalyze phase.
14:53:33.431 INFO: ------------------------------------------------------------------------
14:53:33.432 INFO: EXECUTION FAILURE
14:53:33.432 INFO: ------------------------------------------------------------------------
14:53:33.432 INFO: Total time: 5.867s
14:53:33.469 INFO: Final Memory: 9M/34M
14:53:33.470 INFO: ------------------------------------------------------------------------
##[error]14:53:33.470 ERROR: Error during SonarScanner execution
##[debug]Processed: ##vso[task.logissue type=error;]14:53:33.470 ERROR: Error during SonarScanner execution
14:53:33.470 ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:273)
at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:173)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:121)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHa
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)
… 34 more
Caused by: You must define the following mandatory properties for ‘Unknown’: sonar.projectKey
##[debug]Exit code 1 received from tool ‘C:\agent\vsts-agent-win-x64-2.188.3_work_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.41.0\sonar-scanner\bin\sonar-scanner.bat’
##[debug]STDIO streams have closed for tool ‘C:\agent\vsts-agent-win-x64-2.188.3_work_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.41.0\sonar-scanner\bin\sonar-scanner.bat’
##[debug]task result: Failed
This is my SonarCloudAnalyze step
- task: SonarCloudAnalyze@1
displayName: 'Run SonarCloud analysis'
inputs:
jdkversion: 'JAVA_HOME'
This is my properties file
sonar.projectKey=MKey
sonar.organization=md
=====================================================
Properties that will be shared amongst all modules
=====================================================
SQ standard properties
sonar.sources=src
Properties specific to the C and C++ analyzer:
sonar.cfamily.build-wrapper-output=build_wrapper_output_directory