I am trying to run code analysis in my Pipeline. I have a working instance of Sonarqube and initalized a new project through the web interface.
But when my Pipeline want to run the Scanner, it throws an error, that it need a quality profile.
So np, I thought and opened Sonarqube. But there I see this error and don’t know how I can fix this.
Why do I even need a Quality Profile? Can I somehow turn this off when I start the Scanner?
do you use sonarqube within docker by any chance? usually sonarqube comes with a variety of language analyzers preloaded, but when you create a empty folder and just mount it as a volume to the extensions directory, no plugins are available and everything needs to be installed from the marketplace again. we have some docs how to work around this here.
The community edition should include java and jacoco and already have the sonarway quality profile defined
Yeah you got me. But I try to run Sonarqube in Kubernetes, because my research paper is about the development of a Kubernetes Environment and a CI-Pipeline (where I use Gitlab, which execute its jobs also in Kubernetes).
So it would be beneficial to also have Sonarqube in Kubernetes, as otherwise it would be quite a break in style.
In the Deployment of Sonarqube I followed the advice of the link you provided.
Sadly sonarqube is not yet ready to be easily deployed to k8s
You could create a init container to download the plugins you need into the pvc that you use for sonarqube or if you don’t need any other plugins apart from the bundled once, you could remove the sonar-extensions pvc and mount point completely as we have our bundled plugins in there anyway.
Please note that in case of upgrade all plugins that you would install via the marketplace will be gone as well, but i am sure you already figured this out