Search code examples
sonarqube-scanbitnamigoogle-cloud-buildsonarscanner

Configure sonarqube scanner to run as a step in cloud build on cloud source repository


I've installed sonarqube bitnami instance and manually installed sonar-scanner looking for a way to trigger the scan from cloud build, Is there a way I can reference this sonarqube VM instance in my cloudbuild.yaml (Don't want to use docker) Like for example using container its pulled like (gcr.io/project-id/sonar-scanner:latest) I want it to be pulled from that bitnami VM instance.


Solution

  • It wouldn't be possible to use a VM instance to perform a build step. All steps that carried out on Cloud Build are performed using container images that are pulled and run on a single VM.

    What you might be able to do is create an image that replicates as closely as possible the environment you have on that VM and include it as a custom build step.