I am trying to setup CI/CD pipeline for my node.js application with Jenkins.
What I am trying to do is login to my application server through jenkins and execute the commands on the server with the help of publish over ssh plugin (https://wiki.jenkins.io/display/JENKINS/Publish+Over+SSH+Plugin).
I've selected the Send Files or Execute commands over SSH option and added the following commands in Exec command section.
cd <project-folder> && git pull origin master && npm install
I am getting an error like npm not found but I try to directly on the server there is no error.
So I believe there's is a permission issue on jenkins but i can't find the solution
sh 'env'to print the current environment variables. - Dominik Gebhart