we have one react application and start it using pm2 with pm2 start manually. We have written one script to run it, it is working as expected when we run script manually on server. But when calling from jenkins it is not working as expected.
Below is jenkins job conf:
ssh remote_server_hostname@ip <<'ENDSSH'
cd /home/scripts
./start_reactApp.sh &>> /dev/null
echo "Script executed on remote server successfully"
ENDSSH