diff --git a/Jenkinsfile b/Jenkinsfile index a5930ef..6cfa246 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -69,9 +69,10 @@ pipeline { PATH = "/var/lib/jenkins/.local/share/pnpm:${env.PATH}" } steps { - sh "cd /var/deploys/${env.JOB_BASE_NAME}/" - sh "ROCKET_PORT=3333 pm2 start backend --name ${env.JOB_BASE_NAME}" - sh "pm2 save" + dir("/var/deploys/${env.JOB_BASE_NAME}/") { + sh "ROCKET_PORT=3333 pm2 start backend --name ${env.JOB_BASE_NAME}" + sh "pm2 save" + } } } }