Using the CI/CD of github action we are trying to analysis the projects code.
Able to see projects are getting analysed in the sonarcloud but when trying to get the status from the github action(sonar.qualitygate.wait=true) we are getting the below error.
INFO: EXECUTION FAILURE
INFO: Total time: 50.188s
INFO: Final Memory: 37M/127M
ERROR: Error during SonarScanner execution
ERROR: Failed to get Quality Gate status - Project doesn’t exist
Note:
We are using the correct project key & organization too if not it will not be analysed in sonarcloud.
To be honest, your project looks a bit over-configured. The following parameters wouldn’t be reccomended when using GitHub Actions (because they’re auto-detected, don’t exist, or have an alternative)
Does the project that you’re trying to analyze already exist in SonarCloud when you trigger the scan?
Okay colin. But I think that doesn’t create any issue. Also the project exists before triggering the pipeline that is the reason we can see the analysis report in the in the sonar cloud dashboard too.
Also the same configuration works for other project too. The issues started to come recently for the new project.
It would be great if we can do a call over this rather than going forth & back.
Also, as our account is paid one can we get premium support on it as we need to resolve this Asap
- name: SonarQube end
run: |
dotnet-sonarscanner end \
-d:sonar.login="${{ secrets.SONAR_TOKEN }}"
INFO: Analysis report generated in 362ms, dir size=374 KB
INFO: Analysis report compressed in 62ms, zip size=106 KB
INFO: Analysis report uploaded in 834ms
INFO: Sensor cache published successfully
INFO: ------------- Check Quality Gate status
INFO: Waiting for the analysis report to be processed (max 300s)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 39.018s
INFO: Final Memory: 36M/120M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: Failed to get Quality Gate status - Project doesn't exist
And this is uploaded before the action fails the quality gate.
I am also getting in private projects. Also, note for old projects with same configuration it is working fine. For newly created projects only we are getting issues.
Have done some debugging and able to see the below following things. As you can see we can’t able to get the project status, giving 404 error. So, I guess there is some issue with the
sonarsource/sonarcloud-github-action module
I can see the login the ’ https://sonarcloud.io/api/qualitygates’ call was submitted with is getting a 404.
I would suggest checking the project-level permissions for your project and compare with a successful one.
@AlxO After adding the sonar.qualitygate.wait=true we always getting the same issue for all the projects. Could you please let us know which configuration can go wrong here?
Also, is the same thing is working for your private repositories?
@AlxO Sorry for the late message. Was suffering from fever. Just adding the below screenshot of our project permission. Hope the below things gives and proper insight on the permission.