diff --git a/CHANGELOG.md b/CHANGELOG.md index fcbeb3afc..e18791a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ changes. - Add DRep list pagination [Issue 740](https://github.com/IntersectMBO/govtool/issues/740) - Add PDF pillar [Issue 1090](https://github.com/IntersectMBO/govtool/issues/1090) - Replace govtool-wrapper governance action creation in favor of pdf-pillar [Issue 1284](https://github.com/IntersectMBO/govtool/issues/1284) +- Add sentry environment config [Issue 1324](https://github.com/IntersectMBO/govtool/issues/1324) ### Fixed diff --git a/govtool/frontend/.env.example b/govtool/frontend/.env.example index f7ac65b56..31ad2f00b 100644 --- a/govtool/frontend/.env.example +++ b/govtool/frontend/.env.example @@ -1,3 +1,4 @@ +VITE_APP_ENV="development" VITE_BASE_URL="" VITE_NETWORK_FLAG=0 VITE_SENTRY_DSN="" diff --git a/govtool/frontend/Dockerfile b/govtool/frontend/Dockerfile index 7a0ff1842..df5d226f6 100644 --- a/govtool/frontend/Dockerfile +++ b/govtool/frontend/Dockerfile @@ -1,4 +1,6 @@ FROM node:18-alpine as builder + +ARG VITE_APP_ENV='beta' ARG VITE_BASE_URL ARG VITE_GTM_ID ARG VITE_NETWORK_FLAG=0 diff --git a/govtool/frontend/src/main.tsx b/govtool/frontend/src/main.tsx index 5615a22ce..641d5f102 100644 --- a/govtool/frontend/src/main.tsx +++ b/govtool/frontend/src/main.tsx @@ -42,6 +42,7 @@ TagManager.initialize(tagManagerArgs); Sentry.init({ dsn: import.meta.env.VITE_SENTRY_DSN, + environment: import.meta.env.VITE_APP_ENV, integrations: [ new Sentry.BrowserTracing({ routingInstrumentation: Sentry.reactRouterV6Instrumentation( diff --git a/scripts/govtool/frontend.mk b/scripts/govtool/frontend.mk index 64afa0166..2db555723 100644 --- a/scripts/govtool/frontend.mk +++ b/scripts/govtool/frontend.mk @@ -15,6 +15,7 @@ build-frontend: docker-login if [[ "$(cardano_network)" = "mainnet" ]]; then NETWORK_FLAG=1; else NETWORK_FLAG=0; fi; \ $(call check_image_on_ecr,frontend,$(frontend_image_tag)) || \ $(docker) build --tag "$(repo_url)/frontend:$(frontend_image_tag)" \ + --build-arg VITE_APP_ENV="$(env)" \ --build-arg VITE_BASE_URL="https://$(domain)/api" \ --build-arg VITE_GTM_ID="$${GTM_ID}" \ --build-arg VITE_NETWORK_FLAG="$$NETWORK_FLAG" \