SonarScanner and SAP Business Application Studio

Hi,
i have an client to want to use the sonnar-scanner with her SAP BAS environnement.

He configure the BTP with a virtual host point to a local on-premise SonarQube Server.

In the console of BAS, with the curl command, he reached the server. So when he use the virtual url, sonar-scanner point directly on the net.

do you have some idea

Regards
Sebastien

Hi Sebastien,

It’s not at all clear to me what the problem is. Can you provide more details?

 
Ann

Hi Ann,

my team install directly the sonarscanner in the VM in SAP BAS environnement.

in the project, the configuration point to local URI https://sonarqube.dest

#----- Default SonarQube server
#sonar.host.url=https://sonarqube.dest

The OPS team configure link to make a bridge between internal network and cloud network for SAP BAS. sonarqube.dest to sonarqube.mycie.com

so when the OPS team make an curl in the terminal vm in BAS, the curl are resolved i use : sonarqube.dest.

So when de dev launch de sonarqube runner, this try to reach on the web and no use the sonarqube.dest parameter.

it’s more clear ?

Regards,
Sebastien

Hi Sebastian,

The snippet you’ve shown has the host URL commented out. Is that what’s in production? If so it could be your problem.

 
Ann

Hi @Mortagne,

You need to connect to SonarQube via Cloud Connector if you want to use BAS, which means that you need to configure your Cloud Connector in order to reach out to OnPrem system.

If that’s the case, please try to check the Cloud Connector logs with Debug level. And share it so that we can see more details.

Best regards,
Fan

1 Like

Yes, the cloud connector have the right configuration. I can reach the server with an CURL and this use the Cloud Connector.

So when i launch the sonarqube scanner, this don’t use the Cloud Connector … i use internet directly … i need to setup somethings to use cloud connector ?

Hi @Mortagne,

Let me try to clarify.

So basically you have your project on BAS, and you want to run SonarQube analysis directly on BAS via terminal command line. Currently you are able to run analysis by setting up sonar.host.url=https://sonarqube.dest. But it doesn’t work with virtual URL which is sonarqube.mycie.com here. The scan failed.

Am I correct?

Best regards,
Fan

yes it’s correct

Hi @Mortagne,

You know when you set up the destination in Cloud Connector, you can set up the virtual host there. Did you check your configuration of Cloud Connector?

You may probably know that everything passing from BAS to onPrem system needs to go through Cloud Connector. This is the unique channel to communicate to public world in the context of BTP.

If the configuration is fine, while I would like to ask you check the logs in Cloud Connector. You may need to change logs level to Debug and run analysis with virtual url.

One last questions: is there any restriction to use virtual url rather than sonarqube.dest?

Best regards,
Fan