Sonarqube and code testing - sonarqube

I want to run sonarqube testing on my sonarqube server and want to see test result (test report) from my client machine without touching server.
How can I do that in case of multiple developers will push their code to test on sonar server and need to see test result from their local machine?

There is the http://www.sonarlint.org/ plugin available for eclipse, IntelliJ IDEA and Visual Studio. The plugins for first two IDEs support Java, JavaScript and PHP, the plugin for Visual Studio supports .NET code.
All three offer the Connected Mode which can "establish a connection to a SonarQube server (4.5.4+) and bind your [...] project to a SonarQube project."
This might help you depending on your development environment.

Related

How to scan Local builds using jFrog Xray

We have Artifactory and Xray for our developers and we have Azure DevOps pipelines integrated with these tools where the builds are scanned for each pipeline execution.
But when developers are doing local builds from their development workstations they also need to be scanned before merging to the repos in ADO.
So we are looking for some possibility where the developers are able to connect to Xray from their IDE client itself.
They are using IDEs like, Visual Studio and Visual Studio Code
need to Run the local builds of - NuGet, Maven, Gradle, Android, IOS, Nodes..
Can anyone suggest how this can be achieved from IDEs or CLIs like (jFrog CLI, or git bash, etc...)
You can use the JFrog VS Code Extension which allows you to scan project dependencies using JFrog Xray in VS Code.
It allows developers to view panels displaying vulnerability information about the components and their dependencies directly in their VS Code IDE. The extension also allows developers to track the status of the code while it is being built, tested and scanned on the CI server.

Master branch analysis with Sonarqube (Community Edition)

I understand that it is possible to perform the analysis of the master branch with the Community version.
How can this be done? Since the only way I've found is using the sonar-scanner.
Thanks.
Sonarqube supports scanning of a branch per project in the Community Edition without any additional plugins installed. You typically do this using the scanner that fits into your build tool, e.g. Sonar Maven Scanner, Sonar Gradle Scanner, Sonar MSBuild Scanner plus some other scanners. You'll need to have a SonarQube server running somewhere (locally, or potentially Sonar Cloud) for the Scanner to communicate with.
The terminology may be what's misleading you here - SonarQube is split into 3 main parts:
Sonar Server: the user interface and API, typically run on a remote server
Sonar Scanner: the part that runs on your local/build machine, gathers details about your source code, libraries, test results, coverage etc and submits them to the Compute Engine
Sonar Compute Engine: the part that does all the work of analysing source and byte code, coverage, and test results to calculate any issues and produce quality metrics which Sonar Server then presents back as the result of a scan. This part is normally run as part of you launching Sonar Server so you wont typically have to do anything special to get this working.
You wont be able to get any results without having used all 3 of these parts, normally by downloading and running SonarQube, and then running the scanner using your build tool.
If you're wanting to scan more than a single branch in newer editions of SonarQube (7.3 and above) then you'll need to consider updating to SonarQube Developer Edition, or installing a plugin that support Community Edition Branch Analysis

No code coverage for .NET Projects when MSBuild SonarQube Runner is used

We are using sonarqube 5.1.1 version and faced issues while analyzing .NET projects using sonar-runner.
As the recent update says, sonar-runner does not support .NET projects anymore, we have installed MSBuild.SonarQube.Runner-1.0 to analyze the same.
We are able to create dashboards for the .NET projects now but unit test cases and unit test coverage is missing.
Could you kindly help us here?
Please note that we have enterprise license and all the existing .NET projects in production environment use Visual studio 2010.
I have upgraded the dev instance to check the feasibility.

TeamCity Warning: No enabled compatible agents for this build configurationn

I'm trying to set up continuous integration at my current place of work. It's not something I've done before so I'm fairly certain that there will be a few steps I've not done or things I'm un-aware of.
I installed TeamCity Professional 7.1.3 on a build server (Windows Server 2008 R2). I've created a simple .NET application that has no database connections and only three NUnit tests. This app uses .NET framework 4.
I set up a build step using NUnit and received a number of errors but I've now resolved them, basically by installing the .NET framework on the build server.
I'm now adding an extra step using Visual Studio but TeamCity now displays the warning 'No enabled compatible agents for this build configuration'.
This question looks similar to mine:
What do I need to install a Visual Studio 2010 (sln)-compatible Build Agent in TeamCity? and it helped me solve the problems I had with NUnit but not for this current problem.
Is there something I've missed during my set-up? If I'm building and running tests with NUnit do I need to bother with this second step?
You installed the full framework, correct -- not just the client pieces? Here's a TeamCity forum post on how to resolve the Unmet requirements:DotNetFramework4.0_x86 exists compatibility error when you've previously installed the framework.

How to use CruiseControl.NET for database and windows service deployment?

I have a VS 2008 solutions that includes a number of projects including a couple of class libraries, a web application, a windows service and a SQL 2008 database project. The build server currently has CruiseControl.NET version 1.5.0.6237, command-line subversion client and .NET framework 3.5 SP1 installed (Windows Server 2008 R2, no Visual Studio). I was able to configure ccnet to retrieve get latest from svn repository, build the solution using an MSBuild task and deploy the web application using robocopy. Now I'm struggling to make ccnet deploy the database script and I also need get the windows service deploy and start on the build/dev server. The latest error is that the assembly Microsoft.Data.Schema.Tasks is missing on the build server (I had to add Microsoft.Data.Schema.Common.targets and Microsoft.Data.Schema.SqlTasks.targets files to the solution and modify the database project file to get this far).
What would be the best CI/deployment approach in my scenario? Am I using the right tools for the job, or should I be using something other than ccnet? Do I need to install anything else on the build/dev server to make my life easier?
Please be very specific since I'm new to CruiseControl.NET and MSBuild tasks.
You can use nant.
For a jump start you can use
nantbuilder.
For service install
read this
For a DB deploy read this

Resources