Replies: 3 comments
-
You can add SonarCloud as an app into your BitBucket Workspace. Instructions are here: https://marketplace.atlassian.com/apps/1219262/sonarcloud-for-bitbucket-cloud?tab=installation&hosting=cloud |
Beta Was this translation helpful? Give feedback.
0 replies
-
@rbueker just making connection is easy, but then you have to configure it. Only good options is Bitbucket Pipelines, but how would your |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here's an extract that you might be able to adapt to your set-up: - step: &sonar-scan-and-quality-gate
name: sonar scan and quality gate
caches:
- docker
script:
- export YOURORGVERSION=$(cat VERSION.txt)"+"$BITBUCKET_BUILD_NUMBER
- printenv | sort -f
- pipe: sonarsource/sonarcloud-scan:1.2.0
variables:
EXTRA_ARGS: '
-Dsonar.projectVersion=$YOURORGVERSION
-Dsonar.projectName=$APPNAME
-Dsonar.projectKey="${SONAR_ORGANIZATION}_$APPNAME"
-Dsonar.organization=$SONAR_ORGANIZATION
-Dsonar.branch.name=$BITBUCKET_BRANCH
-Dsonar.branch.target=$BITBUCKET_PR_DESTINATION_BRANCH
-Dsonar.sources="frontend/src,backend/src/main"
-Dsonar.tests="frontend/src/__tests__,backend/src/test"
-Dsonar.exclusions="frontend/src/__tests__/**/*,frontend/src/dev/**/*,backend/src/main/java/**/dev/*,backend/src/main/java/**/*Exception.java,backend/src/main/java/**/transfer_objects/*,backend/src/main/java/**/value_types/*,backend/src/main/resources/**/*"
-Dsonar.cpd.exclusions="backend/src/main/java/ch/yourorg/yourapp/kernel/api/v1/**/*"
-Dsonar.java.binaries="backend/build/classes"
-Dsonar.java.libraries="backend/build/libs"
-Dsonar.junit.reportPaths="backend/build/test-results/test"
-Dsonar.testExecutionReportPaths="frontend/test-report.xml"
-Dsonar.coverage.jacoco.xmlReportPaths="backend/build/reports/jacoco/test/jacocoTestReport.xml"
-Dsonar.typescript.lcov.reportPaths="frontend/coverage/lcov.info"
'
- pipe: sonarsource/sonarcloud-quality-gate:0.1.4 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We want to validate our project source code developed using the play framework 2.7.9, SBT 1.2.8, and java 1.8 using Sonarqube. Code coverage using Sonarqube is a mandatory requirement for us.
We want to use Sonarcloud and Bitbucket pipelines.
I could not find any help/ guidance/ tutorial for this. Can someone provide some directions ASAP
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions