Currently sonar-scanner always use ~/.sonar/cache as cache directory (along with .scannerwork). It does makes sense to cache both of those directories for CI/CD pipelines, but most of them does not allow to cache directories outside of working dir.
It would be great to have an option to set cache location like so:
you’re right, it seems this option is missing.
Sonarlint has such an environment variable = SONARLINT_USER_HOME
For Sonar scanner i only know SONAR_SCANNER_HOME and SONAR_SCANNER_OPTS
If there ain’t a similar environment variable for Sonar scanner you might use a symbolic link !?
Hi @Julien_HENRY Julien, I’ve tried this in the jenkins slave but doesn’t seem to work is there any other way to change the cache location? Please suggest.Thanks!