Must-share information (formatted with Markdown):
Sonarqube version:
- Sonarqube 7.9.6 enterprise version
- what are you trying to achieve
- analysis on master/main branches
- what have you tried so far to achieve this
- Run from branches/pull-requests and on default branches (master/main)
Hello everyone. We upgraded to the enterprise version of 7.9.6 from the community version. However, we noticed that all the analysis that was happening in master/main started to fail, saying that it needed the GITHUB_TOKEN env variable.
Things that we noticed:
We have builds running on Jenkins, and then builds running using github actions. The ones in github actions are failing (as mentioned) but the builds in Jenkins are running successful. We have confirmed that the jenkins nodes do not have the GITHUB_TOKEN environment variable.
Another thing that we noticed is that as long as the environment variable is there, it doesn’t matter if the key is correct or not. We are using our internal action for running sonarqube analysis (mostly using the gradle plugin) so we’re not quite sure how the sonarqube server is able to detect this.
The question from our end is if there’s any official documentation on this environment variable and how it’s used or why it’s needed by the server to run analysis?
There’s a line in the example
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
but even in pull requests and branches it is working without this env variable. but not in master/main.