### Description #### Summary This resolves the issue where Sentry logs and source maps were failing to upload during the deployment pipeline (BLOG-261). The core problem was that the frontend build environment lacked the necessary authentication credentials to communicate with the Sentry API. I've updated the deployment workflow to pass the `SENTRY_AUTH_TOKEN` from our CI secrets into the Docker build context, and updated the frontend Dockerfile to securely mount and utilize this token during the build phase. A minor descriptive adjustment was also made to our pre-commit config. #### Key Changes * **`.gitea/workflows/deployment.yaml`**: Injected the `SENTRY_AUTH_TOKEN` into the build container's secrets configuration. * **`frontend/Dockerfile`**: Configured secure secret mounting (`--mount=type=secret`) to read `SENTRY_AUTH_TOKEN` and expose it as an environment variable specifically during the `pnpm run build` execution. * **`.pre-commit-config.yaml`**: Renamed the `frontend-lint` hook from "frontend lint" to "frontend lint & check" to better reflect its underlying script behavior. #### Testing/Review Notes * Trigger a deployment build in the CI/CD pipeline to test the workflow changes. * Check the build logs for the frontend container; verify that the Sentry plugin successfully detects the token and uploads the sourcemaps/releases without throwing an authentication error. * Ensure no token leakage occurs in the standard CI output logs or the final compiled Docker image layers. ### Package Changes _No response_ ### Screenshots _No response_ ### Reference Resolves #261. ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #265 Co-authored-by: squid <squid@squidspirit.com> Co-committed-by: squid <squid@squidspirit.com>
22 lines
598 B
YAML
22 lines
598 B
YAML
repos:
|
|
- repo: local
|
|
hooks:
|
|
- id: sqlx-prepare
|
|
name: sqlx prepare
|
|
language: script
|
|
entry: ./script/pre-commit/sqlx-prepare.sh
|
|
pass_filenames: false
|
|
files: ^backend/
|
|
- id: backend-check
|
|
name: backend check
|
|
language: script
|
|
entry: ./script/pre-commit/backend-check.sh
|
|
pass_filenames: false
|
|
files: ^backend/
|
|
- id: frontend-lint
|
|
name: frontend lint & check
|
|
language: script
|
|
entry: ./script/pre-commit/frontend-lint.sh
|
|
pass_filenames: false
|
|
files: ^frontend/
|