Modify jenkinsfile for building tailwind
This commit is contained in:
parent
a9869e23ef
commit
ed9377156d
@ -10,11 +10,23 @@ pipeline {
|
|||||||
sh "pm2 delete ${env.JOB_NAME} || true"
|
sh "pm2 delete ${env.JOB_NAME} || true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build java') {
|
||||||
steps {
|
steps {
|
||||||
sh './mvnw clean package'
|
sh './mvnw clean package'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Build frontend') {
|
||||||
|
environment {
|
||||||
|
PATH = "/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:${env.WORKSPACE}/node_modules/.bin:${env.PATH}"
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'cd frontend && npm install && npm run build'
|
||||||
|
dir("src/main/resources/frontend") {
|
||||||
|
sh 'pnpm i'
|
||||||
|
sh 'pnpm build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
environment {
|
environment {
|
||||||
PATH = "/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:${env.PATH}"
|
PATH = "/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:${env.PATH}"
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tailwindcss -i ./main.css -o ../static/main.css --watch"
|
"dev": "tailwindcss -i ./main.css -o ../static/main.css --watch",
|
||||||
|
"build": "tailwindcss -i ./main.css -o ../static/main.css --minify"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
Loading…
Reference in New Issue
Block a user