I am trying to integrate Github with SonarQube. For the time being I am using the default embedded Database. I am stuck at the following step in the Github secrets creation:
Sonar Host URL: In GitHub, create a new repository secret with SONAR_HOST_URL as the Name and your SonarQube server URL as the Value
Since I am using the embedded database I do not have a SonarQube server URL. Is still possible to perform the integration in this case?
I am really new to SonarQube so any help will be appreciated
These are two very different things. Whether or not you use an external DB - which you will need to switch to for production - does not impact the URL of your SonarQube instance. Perhaps you should talk to your network folks for help determining what your URL is.
Hi Ann,
thanks for the reply. Could you be a bit more specific? It happens that I am the network folk, so how should I determine the URL of my SonarQube instance running under Ubuntu 22.04?
Kind Regards
Daniele
This is going to be the server URL with :9000 on the end, unless you’ve configured SonarQube to run at a different port and/or with a web context. Those configurations are in $SONARQUBE-HOME/conf/sonar.properties.
E.G. when I spin up an instance, it’s at http://localhost:9000.
Hi Ann,
I am slowly progressing. Now it is the turn to configure the file .github/workflows/build.yml. My project is C code so I followed the link under SonarScanner CLI: Official SonarQube Scan · Actions · GitHub Marketplace · GitHub. At this page it is stated: Project metadata, including the location to the sources to be analyzed, must be declared in the file sonar-project.properties in the base directory:
Where am I supposed to find this file?
Kind Regards
Daniele
You create the file, and check it in to your project in the project-root directory. The SonarScanner CLI docs include a rudimentary example. The analysis parameters page lists the parameters that can only be set on the analysis side.