Hello,
I have been using sonarqube for some time now with gitlab and gradle and everything was working fine. I upgraded to 9.x and re imported my project from my hosted gitlab instance using the new wizard. Everything went well, except one : main branch analysis fails. I though at first it was just a slow CI problem, but I realized today that no analysis from develop went through.
Merge request analysis are ok and working, but my main branch (develop) is not working. I get the following error:
Task :sonarqube
Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
[okhttp3.internal.http2.StreamResetException: stream was reset: NO_ERROR, okhttp3.internal.http2.StreamResetException: stream was reset: NO_ERROR, okhttp3.internal.http2.StreamResetException: stream was reset: NO_ERROR]
> Task :sonarqube FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonarqube'.
> Failed to upload report: Fail to request url: https://xxx/api/ce/submit?projectKey=<censored_project_key>projectName=<censored>&characteristic=branch%3Ddevelop&characteristic=branchType%3DBRANCH
Here is my CI code:
sonarqube-check:
stage: test
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script: gradle sonarqube
allow_failure: true
only:
- merge_requests
- develop
Versions:
- Sonarqube version 9.2.4.50792 developer
- org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3
I tried running the analysis locally, and I get the same error.
If you have any clues what I could try that would be appreciated !