MATLAB commands not executing on Jenkins agent machine
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I am trying out Jenkins Master-Agent configuration. I want to trigger a MATLAB script that reads a text from .txt file and writes it to a excel file. Below is the MATLAB script written in Testmat.m:
addpath('C:\Slave_Node')
fileID = fopen('Test1.txt','r');
formatSpec='%s';
A = fscanf(fileID,formatSpec);
fclose(fileID);
xlswrite('testdata.xls',A);
The batch script in Jenkins Pipeline to trigger the above Testmast.m file is:
bat label: '', script: '''"C:\\Program Files\\MATLAB\\R2015b\\bin\\matlab.exe" -wait -sd "C:\\Test_Excel_Sharan" -r "restoredefaultpath;addpath(genpath(\'C:\\Test_Excel_Sharan\')); "run('C:\\Test_Excel_Sharan\\Testmat.m');quit force,end" -logfile "log_new.txt"'''
Both scripts work as expected on master machine, but when i run the above scripts on agent machine, Jenkins returns below error:
ERROR: script returned exit code 3
I am not if the issue from MATLAB or Jenkins.
Any help to resolve this issue would be appreciated.
Thanks,
Sharan
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!