- ALM used: Azure Devops
- CI system used: Azure Devops
- Sonarcloud Project: Private
When our developers run a pipeline to analyse code directly on the main branch → Succeeds without issues:
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=84ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=5ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=81ms
INFO: Load active rules
INFO: Load active rules (done) | time=1988ms
However when running the same pipeline, settings, … from a pull request the following error happens:
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=53ms
INFO: Load branch configuration
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 28.999s
INFO: Final Memory: 20M/70M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator
ERROR:
ERROR: Error during SonarScanner execution
ERROR: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator
ERROR:
##[error]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
##[error]15:31:21.466 Post-processing failed. Exit code: 1
15:31:21.466 Post-processing failed. Exit code: 1
##[error]The process '/usr/bin/dotnet' failed with exit code 1
Finishing: Run Code Analysis
We’ve tried setting a new token etc, which verifies without issues but can not seem to work out the issue.
Any suggestions? Our developers are stuck right now and can not work because of this.