Jenkinsfile 940 B

123456789101112131415161718192021222324252627282930
  1. pipeline {
  2. agent any
  3. environment {
  4. DEPLOY_FRONTEND = '/mnt/h/iis/bitforum'
  5. }
  6. stages {
  7. stage('Build') {
  8. steps {
  9. sh 'npm ci'
  10. sh 'npm run build'
  11. }
  12. }
  13. stage('Deploy') {
  14. steps {
  15. sh 'rsync -av --delete --exclude="web.config" --exclude="ecosystem.config.js" .next/standalone/ ${DEPLOY_FRONTEND}/'
  16. sh 'rsync -av --delete .next/static/ ${DEPLOY_FRONTEND}/.next/static/'
  17. sh 'rsync -av --delete public/ ${DEPLOY_FRONTEND}/public/'
  18. }
  19. }
  20. stage('Restart Frontend') {
  21. steps {
  22. sh 'powershell.exe -ExecutionPolicy Bypass -File /mnt/h/iis/bitforum/restart.ps1'
  23. }
  24. }
  25. }
  26. post {
  27. success { echo 'Frontend 배포 성공!' }
  28. failure { echo 'Frontend 배포 실패 - 로그를 확인하세요.' }
  29. }
  30. }