thp-lang.org/Jenkinsfile.groovy

28 lines
603 B
Groovy
Raw Normal View History

2023-10-26 01:51:20 +00:00
pipeline {
agent any
environment {
2024-04-23 15:34:00 +00:00
PATH = "/var/lib/jenkins/bin:/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:${env.PATH}"
2023-10-26 01:51:20 +00:00
}
stages {
2024-03-28 00:32:32 +00:00
stage('Install deps') {
2023-10-26 01:53:43 +00:00
steps {
2024-04-23 15:34:00 +00:00
sh 'pnpm i'
}
}
stage("Test") {
steps {
sh 'pnpm test'
2023-10-26 01:53:43 +00:00
}
2023-10-26 01:51:20 +00:00
}
2024-03-28 00:32:32 +00:00
stage('Build bundle') {
steps {
2024-04-23 15:34:00 +00:00
sh 'pnpm build'
2023-10-26 01:56:46 +00:00
}
}
2023-10-26 02:10:48 +00:00
stage('Deploy') {
steps {
2024-04-23 15:18:38 +00:00
sh 'cp -r ./dist/* /var/www/thp-docs/'
2023-10-26 02:10:48 +00:00
}
}
2023-10-26 01:51:20 +00:00
}
}