Groovy Executing shell & Regex inside Jenkinsfile
I’m running Jenkinsfile to grep pm2 services from a remote server, so I use the grep utility to find the pm2 service-name. Still, Jenkins Groovy does not understand the bash commands and gives errors before building the pipeline.