Jeepers Jeepers - 1 year ago 138
Node.js Question

Un-Enable to Push NPM Build step rsults in TfsBuild to SonarQube

I have a UI project (HTML, CSS, Angular2.0)

I want to add this to sonarqube, we are using TFS for our build.

I have the following steps

enter image description here

broken down they look as follows
step 1
enter image description here
step 2
enter image description here
Step 3
enter image description here
Step 4
enter image description here
Step 5
enter image description here
Step 6
enter image description here

the exception i get is as follows

##[error]The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.

Answer Source

You are actually using the SonarQube Scanner for MSBuild (which as his name suggests only work when you have a MSBuild step). With the current tasks you can't analyze a web project like you want to do. There will be a new version of the SonarQube extension including the SonarQube Scanner for CLI that will allow to do so.

For now, the only solution, I can think of, will be for you to include the binaries of SonarQube Scanner for CLI and add a Command Line step after the npm Build one (you will need to remove the Begin Analysis and End Analysis) that will do the analysis.

More information about the Scanner for CLI here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download