We are trying to setup our SonarCloud CI analysis but impossible. I am following the Github Action configuration:
- generated a token
- added the token to the repository secrets
- added the build workflow
- created the sonar-project.properties files with the correct information
This is the result of the workflow running on the develop branch:
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:35.280s
ERROR: Error during SonarScanner execution
INFO: Final Memory: 22M/80M
INFO: ------------------------------------------------------------------------
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: Re-run SonarScanner using the -X switch to enable full debug logging.
When I enable the debugging I receive this:
06:54:05.918 DEBUG: POST 404 https://sonarcloud.io/api/ce/submit?organization=[OBFUSCATED]&projectKey=[OBFUSCATED]&characteristic=branch%3Ddevelop&characteristic=branchType%3DLONG | time=3411ms
I tried to give the GITHUB_TOKEN all permissions, didn’t change anything.
What else can I try?
Should I be the owner of the SonarCloud project?
Should I add more permissions somewhere?
Should we have a paid Github plan like Team or Enterprise?
In the SonarCloud App, I can’t seem to save the change, not sure if that’s normal:
Details of the project:
- GitHub
- GitHub Actions
- Nx Monorepo with Typescript
- Private repository