I have manually installed the 5.0.1.3006 version since the jenkins auto install in the tools is not working for some reason. I have also included sh 'node -v'
in the jenkins step and this works fine but the withSonarQubeEnv('Sonar_Qube') { sh '${JENKINS_HOME}/tools/sonar-scanner/bin/sonar-scanner' }
fails! Attached the jenkins log. Kindly help.
SONARQUBE_Error.txt (13.9 KB)
Hi,
Since you’re running tools installed directly on your build agent, this is a question of the permissions on your build agent.
From your logs:
Error when running: 'node -v'. Is Node.js available during analysis?
...
Caused by: java.io.IOException: Cannot run program "node": error=13, Permission denied
It looks like you need to grant execute permission on Node.js.
HTH,
Ann
Thanks Ann,
But sorry how exactly do I provide execute permission on Node.js please? On the other hand many of my Node.js and angular jenkins pipeline run perfectly fine and build to give me a working docker image…so I am not very sure about your idea, still I will like to give it a try if you could kindly help me the command to grant the execute permission please.
Hi,
The command is going to vary by operating system. How did you make sure the scanner was executable?
Ann
Mine is Ubuntu 20.04.
How did I make sure the scanner was executable? Did not understand this, my guess it is throwing good enough logs (which I attached in the beginning of this thread) so it must be executing fine…
Got the same problem and had to resort to strace to find the root cause. Try to
chmod +x jre/lib/jspawnhelper