assets_build.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. assets:build:test:
  2. stage: test
  3. services:
  4. - !reference [.services, postgresql]
  5. artifacts:
  6. expire_in: 1 week
  7. paths:
  8. - public/assets/.sprockets-manifest*
  9. - public/assets/application-*
  10. - public/assets/knowledge_base*
  11. - public/assets/print-*
  12. - public/assets/frontend/vite
  13. cache: !reference [.cache, read_only_full]
  14. variables:
  15. RAILS_ENV: 'production'
  16. VITE_TEST_MODE: 1
  17. ZAMMAD_SAFE_MODE: 1
  18. script:
  19. - !reference [.scripts, pnpm_install]
  20. - !reference [.scripts, zammad_db_unseeded]
  21. - node -v
  22. # Don't require Redis.
  23. - bundle exec rake assets:precompile
  24. # The job below builds a production-ready app, but without the test mode flag enabled (VITE_TEST_MODE).
  25. # This is needed in order to check PWA build, which is skipped in test mode due to stability concerns.
  26. # The job will not produce any artifacts, as it is only checking for build errors.
  27. assets:build:production:
  28. stage: test
  29. services:
  30. - !reference [.services, postgresql]
  31. cache: !reference [.cache, read_only_full]
  32. variables:
  33. RAILS_ENV: 'production'
  34. ZAMMAD_SAFE_MODE: 1
  35. script:
  36. - !reference [.scripts, pnpm_install]
  37. - !reference [.scripts, zammad_db_unseeded]
  38. - node -v
  39. # Don't require Redis.
  40. - bundle exec rake assets:precompile