diff --git a/Jenkinsfile b/Jenkinsfile index 39b2c1c..84e2995 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,21 +4,26 @@ pipeline { environment { PHP_VERSION = '8.1' COMPOSER_HOME = "${WORKSPACE}/.composer" + DASHBOARD = '/var/www/lpj' + WORKDIR = '/var/www/lpj/Modules/Lpj' } stages { stage('Checkout') { steps { - sh "git checkout staging" - sh "git pull origin staging" + dir("${env.WORKDIR}") { + sh "git checkout staging" + sh "git pull origin staging" + } } } stage('Build Assets') { steps { - sh "cd /var/www/lpj" - sh "npm install" - sh "npm run build" + dir("${env.WORKDIR}") { + sh "npm install" + sh "npm run build" + } } } }