When I am using this in jenkins pipeline, all of the commands get successfully executed except the last one “pm2 start ./config.json”. the error is “bash: line 1: pm2: command not found”
sh ‘ssh ${userAtIP} “cd ./python && python3 -m venv ./myenv && . ./myenv/bin/activate && ls /usr/local/bin/ && pwd && pip install -r requirements.txt && pm2 start ./config.json “‘
enter image description here
Could anyone please help me?
I tried specfifying the path of the pm2 module as well like “/Path/to/pm2 start ./config.js”
Akib Hasan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.