sonar-gerrit-plugin icon indicating copy to clipboard operation
sonar-gerrit-plugin copied to clipboard

Support/use installation configuration ServerUrl instead of action ServerUrl

Open TheMagician1 opened this issue 2 years ago • 0 comments

What feature do you want to see added?

We have Gerrit, Jenkins and Sonarqube running behind a reverse proxy for public/external access, but internally they can reach each other on a different DNS. So our users use the external DNS to reach Sonarqube, but Jenkins is using the internal DNS. This way we can add additional security to access sonarqube.

For the sonar scan stage this works, because it uses the internal DNS to get the configuration and post the results. Now we want to decorate our changes in Gerrit using this plugin, but it uses the public DNS that is set in the action to connect to Sonarqube. We would like it to use the same DNS that is configured in the installation configuration of SonarQube.

In the tryCreate function of the PullRequestAnalysisTask it is now getting the serverUrl from the action, but also the SonarInstallation is available to fetch the credentials. Could it be changed to also use the serverUrl from the SonarInstallation object?

Thank you for consideration!

Upstream changes

No response

TheMagician1 avatar Mar 09 '23 15:03 TheMagician1