Private BitBucket Cloud repo for Android project.
Analysis ran in BitBucket Cloud Pipeline.
I am having an issue with the SonarCloud PR Analysis, which in turn seems to be affecting the SonarCloud PR Decoration.
It seems like SonarCloud is not able to see any other branches than the ‘main’ branch of the Repo.
Only merges into ‘main’ branch gets analysed and tracked in SonarCloud.
PRs into ‘main’ or any other branches run the BitBucket Pipeline, that runs SonarCloud Gradle task, but no info is made available in either SonarCloud portal or BitBucket PRs.
The SonarCloud section of the PR, ‘Code Quality’ only displays the text “Not analyzed on SonarCloud yet”.
Below is the bitbucket-pipelines.yml file that runs the analysis.
image: bitriseio/docker-android clone: depth: full # SonarCloud scanner needs the full history to assign issues properly definitions: caches: sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build steps: - step: &build-test-sonarcloud name: Build, test and analyze on SonarCloud caches: - gradle - sonar script: - sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac - sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java - export JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64' - ./gradlew build sonarqube -x lint artifacts: - build/libs/** pipelines: # More info here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html branches: master: - step: *build-test-sonarcloud pull-requests: '**': - step: *build-test-sonarcloud