I am having some trouble invoking sonarqube scan in my Gitlab CI pipeline using docker image.
Following is the command i am running as per the documentation.
docker run --rm -v “$pwd:/usr/src” images.artifactory.company_name.com/sonarsource/sonar-scanner-cli:4.7 -Dsonar.branch.name=${CI_COMMIT_BRANCH} -Dsonar.projectKey=${CI_PROJECT_NAME} -Dsonar.login=${SONAR_TOKEN} -Dsonar.host.url=${SONAR_HOST_URL}
and it is being triggered from the directory where i need to run the scan (verified by echoing the pwd variable in pipeline)
still everytime it says in the logs that "0 Files Indexed
Not able to understand what is the issue, and i am trying to run this scan on python language.
Can anyone help me with this.
I would suggest including logs from the analysis, and redacting sensitive information if necessary. Turning on DEBUG logging (adding -X to your scanner command) will also be useful.
I tried turning on Debug logging mode, but still not able to understand the issue.
As stated, I am attaching the log for reference, it will be really great if this can be resolved. sonar_scan.log (39.0 KB)
Attaching the image where, I am echoing the $pwd to check if I am in the right directory where files needs to be analysed, it is also giving the right result.