Adding SonarCloud on large number of VSTS pipelines

sonarcloud
vsts

(CodeJockey) #1

Hi guys,

Can we create a separate task-group in VSTS with the three sonar cloud tasks in it (prepare, analysis, publish) and call this task from every build pipeline ? What I understand is that these tasks needs to be run in a specific order i.e. Prepare, Run Code build, Analysis, Publish; therefore I’ve added these tasks in each and every build pipeline.
What is the right way/structure to introduce SonarCloud in a system with large number of build pipelines.

Thanks :slight_smile:


(Fabrice Bellingard) #2

I didn’t know the concept of task-group in VSTS, so I check on the documentation of VSTS. From what I read, I don’t think that you can achieve this for .NET solution since you must call at least the MSBuild task and the Test task between the Prepare and the Run Code tasks. For Maven and Gradle, this is the same. For all the other cases where you will use the simple scanner, you might be using a task-group.


(CodeJockey) #3

Yes, that’s what I was thinking. But, is there any way a user can conduct just a one time analysis on the code ? I mean a way that a user can just a start a scan on any specific project ?


(Fabrice Bellingard) #4

I’m sorry, but I’m not sure I get what you want to achieve. As long as users have the rights to update the build definitions of their projects, then they can start analyzing their code on SonarCloud (and rely on the SonarCloud endpoint defined for the whole instance).