SonarQube and GitLab-CE Integration in Podman

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Latest versions of all software

  • how is SonarQube deployed: zip, Docker, Helm
    Containers running on Podman / RedHat

  • what are you trying to achieve

I want to setup my dev environment for my Python project such that …

  • Redhat running Podman
    • GitLab CE running in a container - got that working
    • SonarQube running in a container - got that working
    • Got OAUTH between GitLab and SonarQube so can setup repo’s / Projects

Now the bit I can not work out …

I want to get it so that when I do a commit in GitLab to my project repository that this triggers SonarQube / Sonar-Scanner-CLI docker instance to run a code check against the commited project code and produce the report on the SonarQube server.

I have worked out how I can use the Sonar-Scanner-CLI via CLI to scan a folder with my code in and show that in SonarQube, but I can not work out how GitLab CI/CD can trigger all of this ?!?

Not sure if what I am thinking can be done or where I am going wrong ?

  • what have you tried so far to achieve this

Reading the manual / getting confused !

Hey there.

Once you created the proejct in SonarQube, you should see a nifty tutorial in the CI that guides you to set up analysis with GitLab CI/CD.

Have you arrived at this screen?