- ALM used : GitHub
- CI system used : Circle CI
- Languages of the repository : Java, Kotlin
- Error observed : No errors.
- Steps to reproduce : Create new branches in GitHub, commit code, those branches are not visible in SonarCloud.
- Potential workaround : None identified
If you’re using Automatic Analysis, only the main branch and pull request will be analyzed. You would need to switch to CI-based analysis to analyze other branches.
Thank you, Colin for the solution. I will try it and update here.
I have switched to CI-based analysis, and when the CircleCI build runs, it throws an error displaying the below content:
#!/bin/bash -eo pipefail gradle build sonarqube
/bin/bash: gradle: command not found
Exited with code exit status 127
CircleCI received exit code 127
I have already added the plugins and properties in build.gradle for my Android project.
id “org.sonarqube” version “188.8.131.523”
property “sonar.projectKey”, “<key_name_from_sonarCloud>”
property “sonar.organization”, “<org_name>”
property “sonar.host.url”, “https://sonarcloud.io”
property “sonar.sourceEncoding”, “UTF-8”
property “sonar.projectKey”, “<project_key>”
property “sonar.projectName”, “<project_name>”
in config.yml file,
name: Analyze on SonarCloud
command: gradle build sonarqube
Please let me know, what I might have done wrong.
It seems like Gradle isn’t installed on the machine you’re executing analysis, or can’t be found on the PATH. I would make sure that a
gradle build works by itself, and then add in