Sonar Scanner OS detection

I’m using sonar scanner with several Java projects (mix of gradle and maven). When setting up gradle on my Jenkins pipeline, I noticed that recent versions throw errors if they are unable to detect the host operating system. Is it possible to change this to a warning with details of the jre fetch not available?

My Jenkins pipeline is not running on Linux, Windows or MacOS. It’s running on a BSD. This would also likely be a problem for anyone running a solaris variant.

The workaround is, of course, to lie to it and claim it’s Linux. Without linux emulation running, anything it downloads won’t work though.

Hey Lucas!

Can you share what version of SonarQube you’re using, as well as the logs?

I think you should be able to disable this entirely using sonar.scanner.skipJreProvisioning=true. I’m also unfamilar with what the logs look like in this scenario.

I’m using sonar cloud.

The skipJreProvisining flag did work.

Gradle plugin: id “org.sonarqube” version “6.1.0.5360”

Unfortunately, lost the logs from when it was happening. It’s working now.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.