Score:0

When calling script from jenkins it is not working as expected

jp flag

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
Klamber avatar
ru flag
Care to elaborate what is "expected" and what is the "unexpected" result you are receiving?
Satish Lamak avatar
jp flag
expected result is application should be up and running when we call script from jenkins. on the other hand if we run script manually by login to server the application works fine.
Klamber avatar
ru flag
Perhaps if you remove the output redirection to /dev/null you can see some error output.
Satish Lamak avatar
jp flag
I tried that one as well, script ran successfully but application not getting up
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.