Add jenkinsfile

This commit is contained in:
Araozu 2024-05-08 08:47:09 -05:00
parent 1bb0a2be8a
commit 0ddc50e153
2 changed files with 32 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
node_modules
dist
dist
.env

30
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,30 @@
pipeline {
agent any
stages {
stage("Populate env") {
steps {
sh 'rm .env || true'
sh 'echo VITE_BACKEND_URL=https://rimajon2.araozu.dev>>.env'
sh 'echo VITE_WS_URL=wss://rimajon2.araozu.dev>>.env'
}
}
stage('Build') {
agent {
docker {
image "ianwalter/pnpm"
reuseNode true
}
}
steps {
sh 'pnpm i'
sh 'pnpm build'
}
}
stage('Deploy') {
steps {
sh 'rm -rf /var/www/rimajon2/*'
sh 'cp -r ./dist/* /var/www/rimajon2/'
}
}
}
}