Specify all SonarQube info per Jenkins job?

Assume latest SonarQube and Jenkins plugin. We’d be willing to migrate to those (if not already on them) if the following can be done.

Right now we have a centralized Jenkins master with ~30 project-team-owned projects and jobs. Some of those projects necessarily own and run their own SonarQube servers. Those projects with SonarQube servers want to be able to specify their SonarQube server + details for analysis and not have that information exposed within the overall general Jenkins configration.

Is such full configuration of all required SonarQube details possible at the job level?

I am aware of https://jira.sonarsource.com/projects/SONARJNKNS/issues/SONARJNKNS-256 which is a step in the direction we’d like in that it at least allows auth tokens to be stored as credentials scoped to project folders and such.

Any ideas would be appreciated.


IIRC, the global configuration holds the SonarQube URL and analysis token. You can always specify those on the analysis command line, E.G.

./gradlew sonarqube -Dsonar.host.url=[your SonarQube URL]


1 Like

Thanks. That helps.

Also, I’ve determined that just specifying a bogus name of the SonarQube Installation under Jenkins “Configure System” allows me to save that settings page without specifying the other SonarQube details. I just called it “Unknown_SonarQube”.

This lets the basic Jenkins job items like “Prepare SonarQube Scanner environment” and the “Execute SonarQube Scanner” build step … function.