How can I increase the speed of sonarscan running in a CICD pipeline

Hi, I noticed that some of our sonar scan job in gitlab CICD is taking a long time. I understand that the scanning speed can depend on a lot of things. Is there a general recommended approach to increase the scanning speed in CICD pipelines? This article says that if sonar scan is used in a CICD pipeline I need to pay attention to its memory usage. Our sonarqube is deployed in GKE and the postgresql database is deployed in GCP Cloud SQL.

Any suggestion is appreciated!

Hi,

What version of SonarQube are you using? We did some work in the 9-series on analysis speed, so if you’re not on a current version, upgrading should help.

The article you linked to is about server memory. To speed up analysis, you want to allocate memory to the scanner. You’ll do that with the SOANR_SCANNER_OPTS envvarr](SonarScanner).

 
HTH,
Ann