Jenkins pipeline to call SonarQube code coverage for node.js project

I am trying to do code coverage for node js project via Jenkins, I’ve one doubt that where to add the “sonar-project.properties” file, it in root repository that means in sonar-scanner installed repository or in the jenkins path i.e. “/var/lib/jenkins/workspace/$JOB_NAME/”,

can some help to fix this I’m getting error while executing the pipeline.

Error log as follows:

/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/sonardemo/bin/sonar-scanner /var/lib/jenkins/workspace/demosonar@tmp/durable-f32cf5e2/script.sh: 1: /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/sonardemo/bin/sonar-scanner: not found [Pipeline] } WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeed?

Answer

Attribution
Source : Link , Question Author : Mohan Balakrishnan , Answer Author : Community

Leave a Comment