How to do Sonarcloud integration with bitbucket for microservices. Where in our project we have used 5 languages (gradle, c#, go, c++). So please guide me how I will integrate sonarcloud for microservices, so that it will show quality analysis report for all microservices.
What are you referring to when you say “SonarCloud integration”? Are you referring to Pull Request decoration ?
If so, this is a use case that it’s not well supported for BitBucketCloud as for now, but it’s in our plans.
Would you mind sharing what CI do/will you use to launch the analyses?
I am using bitbucket pipeline for CI, where Sonarcloud we are suppose to use in our bitbucket YML and in our project we have used 5 languages.
I want through the documentation of sonarcloud where we have to give our repository URL. So my question is how I will setup Sonarcloud to read each directory of repository (which is small microservices) and should show the quality analysis in sonar dashboard?
Build tool are :- gradle, make, msbuild
I want all microservice should get scanned and show the analysis reports for all microservices.
Below is sample of my yml.
pipelines:
branches:
develop:
-step:
name: Build, Test and Sonarcloud
script:
- cd folder1
- bash ./gradlew clean build
- cd …
-step:
name: Build, Test and Sonarcloud
script:
- cd folder2
- nugget restore file1.sln -NonInteractive
- Mono_IOMAP=case msbuild /t:Build /p: Configuration=“Release” /p:Platform=“Any CPU” /p:OutputPath="./bin/Release/" file1.sln
- cd …
-step:
name: Build, Test and Sonarcloud
script:
- cd folder3
- make
- cd …
For these 3 build tool how I will use Sonarcloud in my repository. Please guide me.
The best solution would be, as we do not support yet “multi-build technologies analyses”, to create 1 SonarCloud project for each of those build tools, otherwise each analysis will overwrite the previous one.
Is it possible to create multiple Sonar Projects (for different technologies) pointing to same Bitbucket Repository (Mono Repository).
We have a Mono Repository in Bitbucket with multiple microservices into separate folders (java, .net, C, GO, etc.). So we want to analyze this Bitbucket Mono repository with Sonarcloud.
Yes you can, the only thing is that you will not be able to have multiple Quality Gate widgets on the PR / repo page on Bitbucket, this is not currently supported.
You will have as many Quality Gate as the number of projects you will setup. However they will not be grouped on SonarCloud, but displayed as currently, in each different project.
We support “mono-repo” for GitHub and Azure DevOps only for now, and this is only decorating Pull Request with multiple Quality Gate results.
It’s something we have in mind but we don’t have any ETA to give you, mainly because it was not asked enough by our users/customers. I you want to give that a bit more traction, i suggest you to opened a new feature suggestion and ask for votes, we then may reconsider the priority of that feature.
We have purchased licenses for sonarcloud. we have integrated bitbucket cloud repositories for sonarcloud. our bitbucket cloud has instance of mono repo. per documentation, sonarcloud only supports monorepo hosted on github.
for now we want to understand how we can scan mono repo hosted on bitbucket cloud (as best practice) till the time you add it as feature to support monorepo on bitbucket cloud.
Hi folks, Monorepo for Bitbucket is our next priority for SonarCloud regarding the support of ALMs. I feel like it will be released during Q1 2021. Stay tuned
hey @Valery_Possoz ,
you know that committing to an estimation date is a dangerous game ^^
I’d say the estimation (again it’s an estimation, not a commitment ) is by the end of April