aqp-combi/Jenkinsfile
2024-09-09 17:00:35 -05:00

29 lines
844 B
Groovy

pipeline {
agent any
environment {
PATH = "/var/lib/jenkins/bin:/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:${env.PATH}"
}
stages {
stage('Install deps') {
steps {
sh 'pnpm i'
}
}
stage('Build bundle') {
steps {
sh 'pnpm build'
}
}
stage('Deploy') {
steps {
// Clean previous deploy
sh 'rm -rf /var/www/combi/assets /var/www/combi/data /var/www/combi/n'
// Check if the tiles folder exists. If it does not,
// extract the tiles
sh "if [ ! -d /var/www/combi/tiles ]; then \n tar -xf tiles.tar.gz -C /var/www/combi \n fi"
sh 'cp -r ./dist/* /var/www/combi/'
}
}
}
}