I have the following code running on my jenkins build step: "execute shell"
#!/bin/sh
workspaceDirectory=WORKSPACE
appName=ClaimCenter
perl WORKSPACE/directory/scripts/FileLoaderDoItTwiceFinal.pl $workspaceDirectory $appName
curl --ntlm --user myUserName:myPassword --upload-file WORKSPACE/directory/test/ClaimCenterUnmatchedProperties.csv https://sharpoint/share/sharesight/TrainingManuals/RTC/PropertyFileAnalyzer/filename.csv`
appName=ContactManager
perl WORKSPACE/dircectory/scripts/FileLoaderDoItTwiceFinal.pl $workspaceDirectory $appName
curl --ntlm --user myUserName:MyPassWord --upload-file WORKSPACE/CliamCenterBatch/test/ContactManagerUnmatchedProperties.csv
https://sharpoint/share/sharesight/TrainingManuals/RTC/PropertyFileAnalyzer/filename.csv`
Jenkins builds for a long time so it is very difficult to test repeatedly but after the build opperations happen, the following is output to the jenkins console:
[TEST-SAMPLE-BUILD-CLAIMS_Dev_Tools_blucas-DEF] $ /bin/sh/tmp/hudson4025671051509183982.sh
/tmp/hudson4025671051509183982.sh: line 5: perl: command not found
/tmp/hudson4025671051509183982.sh: line 6: curl: command not found
/tmp/hudson4025671051509183982.sh: line 10: perl: command not found
/tmp/hudson4025671051509183982.sh: line 11: curl: command not found
/tmp/hudson4025671051509183982.sh: line 12: https://sharpoint/share/sharesight/TrainingManuals/RTC/PropertyFileAnalyzer/filename.csv` : No such file or directory
please help me understand why this build is not understanding these commands
The error message is telling you that perl
and curl
binaries couldn't be found, which means that the environment for your script does not have PATH
environment variable set.
To fix this, use the full paths to the binaries, instead of just their names. eg:
/usr/bin/perl WORKSPACE/directory/scripts/FileLoaderDoItTwiceFinal.pl $workspaceDirectory $appName
/usr/bin/curl --ntlm --user myUserName:myPassword --upload-file WORKSPACE/directory/test/ClaimCenterUnmatchedProperties.csv https://sharpoint/share/sharesight/TrainingManuals/RTC/PropertyFileAnalyzer/filename.csv`
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.