Add SonarQube for Apache Cloudberry#1004
Conversation
|
Now waiting for the ASF infra team to help create a new account at sonarcloud and enable the sonarcloud secrets for this repo. Related issues: |
8bbcdbe to
b5289ac
Compare
They have been set up. I did one test in my own repo, it can run well before the getting token: https://github.com/tuhaihe/cloudberrydb/actions/runs/14056552786/job/39357194543. So, we can merge this PR to see if the workflow is running on the main branch. |
|
Hi @chipitsine, could you help take a look at this PR? Thanks! The following is the base configuration suggested from the sonarqube: I customized the code for Cloudberry. FYI. |
|
I'll try native docker image (as it was done in coverity scan) |
|
Hi @chipitsine Just bumping this to check the test progress. If any questions, feel free to let me know. |
|
well, I only had idea to test using the same docker build image. |
|
I did build by myself, I created pipeline from scratch and apparently I ended with very similar pipeline. Sonar also suggests scanning on PRs, but current scan takes ~1.5 hours, I'm not sure we want that now._ |
Thanks @chipitsine for your test. Yes, we can enable the testing only on the main branch weekly for now, otherwise it takes too much time. |
|
I did a few research again on how other ASF projects use the asf's sonarcloud token:
So change the Secret name to the default |
|
If we use So change the way of loading the submodules with |
|
Tested SonarQube on my own repo, the workflow works:https://github.com/tuhaihe/cloudberrydb/actions/runs/14506822618/job/40697674135. You can see the results here: https://sonarcloud.io/summary/overall?id=apache_cloudberry&branch=main. |
b11dbda to
0f0bd28
Compare
This PR introduces the SonarQube for Apache Cloudberry as a code quality and security tool, which is similar to the Coverity. We also use the Cloudberry docker image as the running base env.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions