I am keeping a shell script file named urltest.sh in /var/lib/jenkins and executing the file from Jenkins build.
When I execute the build, It fails.
The Environment Variables are -
HOME - /var/lib/jenkins ;
JENKINS_HOME - /var/lib/jenkins
The console output comes as:
Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/AutoScript
[AutoScript] $ /bin/sh -xe /tmp/hudson2777728063740604479.sh
+ sh urltest.sh
sh: 0: Can't open urltest.sh
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I am confused where I should keep the shell script file so that it is executed.