Execution a deployment script on a remote ssh server through a Jenkins pipeline -
i've got jenkins pipeline containing stages source loading, building , deploying on remote machine through ssh. problem last one. saved script of following template on remote server:
#!/bin/bash bash /<pathto>/jboss-cli.sh --command="deploy /<anotherpath>/service.war --force" it works fine if executed in terminal connected remote server.
the best outcome i've received through jenkins
/<pathto>/jboss-cli.sh: line 87: usr/bin/java/bin/java: no such file or directory
in jenkins console output.
tried switching between bash , sh, exporting path java in pipeline script etc.
any suggestions appreciated. thanks!
p.s. execution call jenkins looks like:
sh """ ssh -o stricthostkeychecking=no $connectionname 'bash /<pathtothescript>/<scriptname>.sh' """
line 87: **usr/bin/java/bin/java**: no such file or directory as per error line considering path usr not /usr. can check if problem is?
sorry, know should in comments section don't have right add comments yet.
Comments
Post a Comment