From 53c0df182f2b4435ef0a31f3e37a8464680b98ed Mon Sep 17 00:00:00 2001 From: Araozu Date: Sat, 4 Nov 2023 10:17:37 -0500 Subject: [PATCH] jenkins 4: the automation menace --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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" + } } } }