Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Enable sentry release #475

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ on:
branches:
- 'deploy/main'

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: production

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@master
Expand Down Expand Up @@ -56,8 +52,12 @@ jobs:
build-args: |
"GITHUB_SHA=${{ github.sha }}"
"GITHUB_REF=${{ github.ref }}"
"GA_TRACKING_ID=${{ env.GA_TRACKING_ID }}"
"SENTRY_DSN=${{ env.SENTRY_DSN }}"
"GA_TRACKING_ID=${{ secrets.GA_TRACKING_ID }}"
"RELEASE=${{ github.sha }}"
"SENTRY_DSN=${{ vars.SENTRY_DSN }}"
"SENTRY_ORG=${{ vars.SENTRY_ORG }}"
"SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}"
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"

# Deploy the Docker image to the GKE cluster
- name: Deploy
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/deploy-rinkeby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ on:
branches:
- 'deploy/rinkeby'

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
IS_TESTNET: 'TRUE'

jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: rinkeby
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
IS_TESTNET: 'TRUE'

steps:
- name: Checkout
Expand Down Expand Up @@ -57,6 +55,11 @@ jobs:
"IS_TESTNET=${{ env.IS_TESTNET }}"
"GITHUB_SHA=${{ github.sha }}"
"GITHUB_REF=${{ github.ref }}"
"RELEASE=${{ github.sha }}"
"SENTRY_DSN=${{ vars.SENTRY_DSN }}"
"SENTRY_ORG=${{ vars.SENTRY_ORG }}"
"SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}"
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"

# Deploy the Docker image to the GKE cluster
- name: Deploy
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ ARG IS_TESTNET
ENV IS_TESTNET ${IS_TESTNET}
ARG GA_TRACKING_ID
ENV GA_TRACKING_ID ${GA_TRACKING_ID}
ARG RELEASE
ENV RELEASE ${RELEASE}
ARG SENTRY_DSN
ENV SENTRY_DSN ${SENTRY_DSN}
ARG SENTRY_ORG
ENV SENTRY_ORG ${SENTRY_ORG}
ARG SENTRY_PROJECT
ENV SENTRY_PROJECT ${SENTRY_PROJECT}
ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN ${SENTRY_AUTH_TOKEN}
ENV NODE_ENV production
COPY ./ ./
RUN yarn build
Expand Down
18 changes: 17 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const {
CI,
GA_TRACKING_ID,
SENTRY_DSN,
RELEASE,
} = process.env;

export default {
Expand Down Expand Up @@ -105,6 +106,14 @@ export default {
"'unsafe-inline'",
'fonts.googleapis.com',
],
'worker-src': [
"'self'",
'blob:',
],
'child-src': [
"'self'",
'blob:',
],
},
},
},
Expand Down Expand Up @@ -159,7 +168,7 @@ export default {

sentry: {
config: {
ignoreErrors: ['WebAssembly.instantiate'],
release: RELEASE,
},
tracing: {
tracesSampleRate: IS_TESTNET ? 1.0 : 0.1,
Expand All @@ -171,9 +180,16 @@ export default {
routeLabel: 'name',
},
},
publishRelease: !!RELEASE,
clientIntegrations: {
/* default integrations will still be added due to deep-merge */
ReportingObserver: false, // reporting is very noisy on CSP violation.
Replay: {},
},
clientConfig: {
ignoreErrors: ['WebAssembly.instantiate'],
replaysSessionSampleRate: IS_TESTNET ? 1.0 : 0.05,
replaysOnErrorSampleRate: IS_TESTNET ? 1.0 : 1.0,
},
},
sitemap: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"@nuxtjs/storybook": "^4.1.1",
"@nuxtjs/stylelint-module": "^4.0.0",
"@nuxtjs/tailwindcss": "^5.3.5",
"@sentry/webpack-plugin": "2",
"@types/lodash.chunk": "^4.2.6",
"@types/lodash.debounce": "^4.0.6",
"@types/mime-types": "^2.1.1",
Expand Down
Loading
Loading