Our team has recently subscribed to SonarCloud, and were wondering the best practice to go about an issue in our process we are currently facing.
We have successfully integrated the SonarCloud analysis to run in our Azure DevOps CI pipeline:
- According to SonarCloud, we have about 850,000 lines of code considered in the analysis
- Our pipeline runs an average of 5 mins without the SonarCloud code analysis, and around 30 mins with the analysis
As you can see the code analysis increases significantly the execution time of our pipeline, and we are facing the following issue below:
- 3 developers check in code at the same time
- Each developer’s work will be queued, and only after the pipeline has been ran for each of their work (30 mins each), the pipeline will be ran again for the next developer, including a brand new SonarCloud analysis each time
- Total time taken for all the aforementioned work to be reflected in the deployed site would be about 1.5 hours
Upon more digging, we have found that the “incremental analysis” feature is just what we need but unfortunately, it is no longer supported nor recommended to use by the SonarCloud team. So in regards to the process explained above, we would like to know perhaps the best practices to implement to reduce analysis time and redundancy in our pipeline.
Looking forward to any help. Thank you.