SonarQube & DevOps Intergration via AzureDevOps Self Hosted Agent

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    9.5.0.56709 - Enterprise

  • what are you trying to achieve
    Normally with SQ & DevOps integration you point DevOps to a Server URL. Our server however sits behind firewalls etc, No NAT inbound connection due to the wide range of IP’s you would have to allow for DevOps to access server. So we were recommended to go down the route of having a AzureDevOps Self Hosted Agent next to the SQ server and that would be used as the bridge. E.g. DevOps Speaks to Agent & Agent speaks to SonarQube & Vice Versa.

When trying o configure this comms path we are hitting a brick wall. SonarQube instructions say to add Server URL but thats not accessale via DevOps… Has anyone done this type of integration before? How Do I get the comms path to work via the ADO agent? Im stuck!!

===============
In SQ… Projects… Project Name… Analyze your project with Azure DevOps Pipelines… Add Add On - Done…

Add a new SonarQube Service Endpoint in your project

  1. In Azure DevOps, go to Project settings > Service connections
  2. Add a new service connection of type SonarQube
  3. Enter your SonarQube server url: https://sonarqube.abc.mycompany.com/ - This server is not accessible via Azure DevOps and we need to push traffic via agent instead…

This is where I am now stuck

  1. Enter an existing token, or a newly generated one:Generate a token
  2. Enter a memorable connection name
  3. Create the service connection
    =======================================

Thank you in advance for any advice / assistance.

Hey there.

Azure DevOps doesn’t have to speak directly to the SonarQube server (only through the build agent). The information just needs to be provided to the service connection – no connection attempt is made.

What happens if you put in the URL and token anyways?