I want setup multiple long lived branch for my python flask project but issue here is whenever I add the project on Sonarcloud for the first time it pick up for Automatically Analysis and according to the documentation (To enable branch analysis, your project must be set up for build-based analysis, not automatic analysis. Branch analysis is not available with automatic analysis.)
Afterwards manually change the analysis method from Automatic to build based CI Integrate.
Then in build.yml I add the below regex. But still it only showing master branch on Branch Tab inside project.
Is the SonarCloud Analysis action running on those branches (check the logs of GitHub Actions runs on that branch). Keep in mind that your changes to build.yml will also have to be merged into those branches.
Yes I have branch which follow this regex (master_*).
And I again tried with removing my project from SonarCloud and then add it again and this time I also make sure that build.yml and sonar.properties file should be both on master and master_uat branch.
And the action you specified… ran? On the non-master branch? If not – that’s something to be sorted with GitHub Actions (making sure they’re triggered on your non-master branches).
If they did run, and you’re still without analysis of the other branch, what do the logs from the scanner say (the logs from the execution of the action)
If you click into the logs for a run on master_test, do you see that SonarCloud analysis run? If so, where does it link you at the end of the scanner logs?
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=xxxxxxx&branch=master
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=xxxxxx
INFO: Analysis total time: 27.746 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Hi Colin,
It run successfully check the below log for master_test.
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=**OrganizationName_RespositoryName**&pullRequest=4
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=xxxxxx
INFO: Analysis total time: 25.347 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
And still getting the same issue only master branch is showing.