I have hosted sonarqube on an EC2 instance from the bitnami AMI and integrated it with GitLab to analyze source projects using the sonar-gitlab plugin. I have a project (Project A) with the gitlab ci yml file containing sonar scanner image, sonar url and other specifics. Also, there is sonar-project.properties file with projectkey and sources pointing to current directory, and a python file for analyzing the code. This setup works perfectly fine.
There is another project (Project B) with actual code which I would like to analyze whenever there is a commit to the master branch using Project A, the challenge is I should not change anything in the Project B like adding a stage or trigger.
I have tried to change the sonar.sources to point to the URL of Project B and specifying sonar.projectDir but nothing seems to work. Any insight or suggestions on how to get this working is appreciated.
Sonarqube - bitnami-sonarqube-188.8.131.52681-0-linux-debian-10-x86_64
Sonar-gitlab plugin - 4.1.0-SNAPSHOT