How to move Run Code Analysis from the Build to Release pipeline in Azure DevOps

Hello.

We use version Version 6.7.6 (build 38781) of SonarQube using MSBuild in Azure DevOps. We are able to successfully run the analysis as part of a build by including the Prepare Analysis on SonarQube and Run Code Analysis build steps. The latter takes about 40 minutes. My supervisor wants to save SQ artifacts from the build process and instead of using Run Code Analysis in the build, to add the Run Code Analysis step to a release pipeline triggered after the build, so the build itself does not have that extra 40-minute step. How can we do this? (Part of the question might be: what artifacts does SQ generate during the build and how can we access them at a later time?)

Thank you,

Anatoly

Hello Anatoly,

Part of the analysis cannot be done outside the build, as we rely on roslyn API to run the C# analyzer.
Could you share the full log of your analysis, in order to have a better understanding of what is taking so long in your end analysis step.

Thanks,

-Chris