If all went well you should now have a basic working build configuration. There we go, now you can press the run build button to see if it works! :-) If you want, you could set this parameters globally at your root project, or for all your builds on this specific project. Using these allows us to only need to change their value in one place. This step will submit the analysis to SonarQube.Īfter defining these steps we’ll also need to define the parameters used in the commands. You’ll notice the parameters enclosed with %’s. This step is used to hook in the SonarQube runner into the msbuild process. d:"anization=%anization%" /v:"%build.number%" This step will restore the NuGet packages required for building the solution. I’d like to start with a clean slate and click on configure build steps manually. Since this is a new project in TeamCity, I’ll start with creating a project.Īfter clicking through the wizard, TeamCity discovered one build step for my project. We’re going to install some dependencies on the build agent.Ĭhoco install -y microsoft-build-tools msbuild-sonarqube-runner Step 2: Setting up a build configuration for SonarQube analysis. ![]() You can check out the source code analyzed at github. That’s why this post will just use the command-line tools available, with the added bonus advantage of easier portability over different types of build servers. In my first attempt of integrating TeamCity and SonarQube I tried to use TeamCity SonarQube plugin, but it seems to be abandoned as the specific documentation for the runner this plugin relies on doesn’t seem to exist anymore runner documentation. This blog post follows my previous post “Getting started with SonarQube on a C# project”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |