Skip to content

Repository files navigation

Cake.Sonar

Build (and release) NuGet NuGet downloads

Addin used to execute the MSBuild scanner for SonarQube using cake aliases. Don't forget to include the tool package.

#tool nuget:?package=MSBuild.SonarQube.Runner.Tool
#addin nuget:?package=Cake.Sonar

Task("Sonar")
  .IsDependentOn("SonarBegin")
  .IsDependentOn("Build")
  .IsDependentOn("Unit")
  .IsDependentOn("SonarEnd");

Task("SonarBegin")
  .Does(() => {
     SonarBegin(new SonarBeginSettings{
        # Supported parameters
        Key = "MyProject",
        Url = "sonarcube.contoso.local",
        Token = "token",
        Verbose = true,
        # Custom parameters
        ArgumentCustomization = args => args
            .Append("/d:sonar.gitlab.project_id=XXXX")
            .Append("/d:sonar.gitlab.xxx=XXXX")
        });
     });
  });

Task("SonarEnd")
  .Does(() => {
     SonarEnd(new SonarEndSettings{
        Token = "token"
     });
  });

About

🍰 🧩 Cake addin to execute the MSBuild scanner for SonarQube in Cake builds

Topics

Resources

Stars

31 stars

Watchers

9 watching

Forks

Releases

Used by

Contributors

Languages