Hi,
I recently integrated SonarCloud to a public GitHub repository with a CircleCI workflow. At first I thought it was working as expected since all tasks passed in CI ( and because I was able to see the check on PRs), but then I noticed SonarCloud check was only triggered after the second run of the CircleCI workflow, for the first the check won’t even appear in the PR.
I followed the steps on the tutorial on https://sonarcloud.io/ and I’m building with Gradle so I’m not using the official Orb, just Gradle’s plugin org.sonarqube
(version 2.8
) as suggested by the tutorial. Am I missing something?
I’m leaving some details of my project bellow. Thanks in advance
- Languages of the repo: Java
- Repo URL: https://github.com/JoseLion/maybe
- ALM: GitHub
-
CI system: Circle CI
- Using a CircleCI context named
SonarCloud
were the environment variableSONAR_TOKEN
is set - The
SonarCloud
cintext is used in the build step were the scanner command is triggered
- Using a CircleCI context named
-
Scanner command:
- Using Gradle’s plugin
org.sonarqube
version2.8
:./gradlew sonarqube
- Plugin configuration closure:
sonarqube { properties { property 'sonar.projectKey', 'JoseLion_maybe' property 'sonar.organization', 'joselion' property 'sonar.host.url', 'https://sonarcloud.io' property 'sonar.pullrequest.provider', 'github' property 'sonar.junit.reportPaths', "${buildDir}/test-results/junit" property 'sonar.coverage.jacoco.xmlReportPaths', "${jacoco.reportsDir}/test/jacocoTestReport.xml" } }
- Using Gradle’s plugin