Score:0

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

gb flag

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?

ba flag
Did you run your unit tests w/coverage analyzer first? What's your invocation and youe scanner invocation?
Mohan Balakrishnan avatar
gb flag
I am trying to check code quality to perform automatic reviews with static analysis of code to detect bugs
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.