Another option is just to change the shell script and put the path in there (e.g. change matlab to /opt/matlab/bin/matlab or whether the matlab executable is)
Richard. On Thu, Jun 26, 2014 at 9:59 PM, Rachit Kumar <[email protected]> wrote: > Frankly I am new to Jenkins and new to Linux environment as well! > How can I check what is th euserid jenkins is using and how do I set the > PATH for that userid. Also I do not have root access, so will it be > possible for me to change the PATH of Jenkins userid and and run the MATLAB > simulation. > Thank you! > > > On Thursday, 26 June 2014 11:36:49 UTC+2, [email protected] wrote: > >> Doesn’t matlab: command not found tell you what the problem is? If it >> works from the terminal but not under Jenkins, then the PATH is presumably >> different in the two cases. Did you try in from the terminal using the same >> userid that Jenkins runs under? >> >> >> >> *From:* Rachit Kumar [mailto:[email protected]] >> *Sent:* 26 June 2014 10:30 >> *To:* [email protected] >> >> *Subject:* Not able to run MATLAB execution using shell script. >> >> >> >> Following is the shell script: >> >> #!/bin/bash >> matlab -nosplash -nodisplay -r >> "InitFileName='model_init',VariableList={'motorspeed' >> 'motorpositions' 'voltage'},SimStart=0,SimEnd=20,ModelName='jenkins_test_ >> model';jenkins_matlab" >> >> This works fine when I execute it from Terminal, but throws following >> error when I use 'Execute shell' to run the script: >> >> [MATLAB_Jenkins_Integration] $ bash -xe /tmp/hudson567488996824014170.sh >> >> + /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh >> Build-102 >> >> /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/build.sh: >> line 2: matlab: command not found >> >> Build step 'Execute shell' marked build as failure >> >> [htmlpublisher] Archiving HTML reports... >> >> [htmlpublisher] Archiving at BUILD level >> /unsecured/jenkins/workspace/MATLAB_Jenkins_Integration/project/output to >> /srv/jenkins/jobs/MATLAB_Jenkins_Integration/builds/2014-06-26_11-03-09/htmlreports/Simulation_Result >> >> Finished: FAILURE >> >> >> It would be really great if someone can help resolving this problem. >> Thanks in advance! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> >> For more options, visit https://groups.google.com/d/optout. >> >> -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
