From 113505c65ce97336ea2ff728253f48dbe7fbaadc Mon Sep 17 00:00:00 2001 From: Araozu Date: Thu, 26 Oct 2023 21:01:33 -0500 Subject: [PATCH] jenkins --- Jenkinsfile.groovy | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index ea62c77..c26ec0c 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -1,10 +1,23 @@ pipeline { agent any + environment { + PATH = "/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:/var/lib/jenkins/bin:${env.PATH}" + } stages { + stage('Install') { + steps { + sh 'pnpm i' + } + } + stage('Build') { + steps { + sh 'pnpm build' + } + } stage('Deploy') { steps { sh 'rm -rf /var/www/horarios-v2/*' - sh 'cp -r ./* /var/www/horarios-v2/' + sh 'cp -r ./dist/* /var/www/horarios-v2/' } } }