Trying to setup sonarqube for my makefile C project, using the sample Jenkinsfile shared Jenkinsfile.txt (613 Bytes)
Error seen sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make clean build-wrapper: execvp: No such file or directory
My directory structure is as follows-
sonar
project_folders
Makefile
bw_output
When executing the cmds mentioned in the Jenkinsfile locally, i am able to build successfully, without any issues. I have logs for both (the success case locally & the error case on the Jenkins server) and can be shared via DM.
Things tried already -
Verified the presence of build-wrapper at the correct location
Veried read/write/execute cmd for all relevant folders.
Relative paths replaced with absolute paths.
Is that all the error says? Is there nothing after that? Because I suspect this is related to permissions. Does the user account running analysis on the build agent have full permissions to the workspace, recursive?
What happens if you delete the bw_output directory from your project? I assume it’s only there to give the build-wrapper a place to output to, but I believe the build-wrapper will create its output directory, so there shouldn’t be a need to provide it with a pre-created directory.
Thanks Ann,
The error doesnt say anything else "+ sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make clean build-wrapper: execvp: No such file or directory [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Posting build status of FAILED to Bitbucket Server for commit id [5c7a06364d3b42390d3786871fdee65a179efb10] and ref ‘refs/heads/sonarqube_test’ Finished: FAILURE"
I dont think it is a user account based permission issue as it is able to previous cmds without any issues. I have checked the permissions of the specific file & folder as i have mentioned before, they seem to be fine.
You are right bw_output is being created by buildt-wrapper itself. I didnt provide it myself, that was just for representation.
Thanks for the build-wrapper files. What I’m looking for is your analysis log.
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
If you check the Jenkinsfile attached, you can see that the current issue is in “build” stage, before it has had a chance to move to the stage(‘SonarQube Analysis’). That is where i think the analysis will happen, right?