CAST HIGHLIGHT - CLI - Error during the execution of CLI Agent using Azure

The following error is seen when running the CLI agent using Azure.

 Error: Unable to access jarfile /home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260\HighlightAutomation.jar
exec error: Error: Command failed: java -jar "/home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260\HighlightAutomation.jar" --perlInstallDir "/usr/bin/perl" --analyzerDir "/home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260/perl" --workingDir "/App" --sourceDir "/App" --technologies "Python" --basicAuth "undefined" --companyId undefined --applicationId undefined --serverUrl "undefined" --snapshotLabel "manuellopez-carralero master 71"
Error: Unable to access jarfile /home/vsts/work/_tasks/highlightcodescan_d09a7949-d043-4058-b56c-103b0da04686/5.1.260\HighlightAutomation.jar
Finishing: CAST Highlight Code Scan

mceclip0.png

Solution 

The issue was due to the difference in the file systems used in Windows and Linux machines. Windows uses a backward slash (\) while linux uses the forward slash (/).

The following change was made on the 67th line of the file index.js (found under work folder), to make sure that the CLI works in both the Windows and Linux machines.

var fullcommandline = 'java -jar "'+agentpath+'/HighlightAutomation.jar" --perlInstallDir "'+perlInstallDir+'" --analyzerDir "'+agentpath+'/perl" --workingDir "'+workingdir+'" --sourceDir "'+sourcedir+'" '+exclusionFolders_cmd+' '+technologies_cmd+'  '+skipUpload_cmd+' '+snapshotLabel_cmd+' ';

Additional Resources

CAST Highlight Troubleshooting Guides

CAST Highlight Product Documentation

 

 

Zendesk Ticket Number 

23932

 

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk