Skip to content

Commit

Permalink
chore: switch sentry to secret, remove args and git hash
Browse files Browse the repository at this point in the history
  • Loading branch information
rafasdc committed Jan 22, 2025
1 parent 6c6e786 commit d5a272e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
env:
GIT_HASH: ${{ env.GIT_HASH }}
SENTRY_AUTH_TOKEN: ${{ env.SENTRY_AUTH_TOKEN }}
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
Expand All @@ -75,9 +72,7 @@ jobs:
file: ${{ matrix.dockerfile }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
SENTRY_AUTH_TOKEN=${{ env.SENTRY_AUTH_TOKEN }}
GIT_HASH=${{ env.GIT_HASH }}
secrets: 'sentry_token=${{ secrets.SENTRY_AUTH_TOKEN }}'
cache-from: type=registry,ref=${{ matrix.image }}:buildcache
cache-to: type=registry,ref=${{ matrix.image }}:buildcache,mode=max
# cache-to: ${{ github.ref == 'refs/heads/main' && 'type=registry,ref=${{ matrix.image }}:buildcache,mode=max' || '' }}
Expand Down
5 changes: 1 addition & 4 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ RUN yarn --frozen-lockfile
# Build the app
FROM base AS builder

# ARG GIT_HASH
# ARG SENTRY_AUTH_TOKEN
# ENV GIT_HASH=${GIT_HASH}
# ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
RUN --mount=type=secret,id=sentry_token,env=SENTRY_AUTH_TOKEN

# Copy node_modules from the deps stage
COPY --from=deps ${APP_HOME}/node_modules ./node_modules
Expand Down
8 changes: 1 addition & 7 deletions app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ const moduleExports = {
language: 'typescript',
},
},
generateBuildId: async () => {
return 'latest';
},

publicRuntimeConfig: {
NEXT_PUBLIC_GROWTHBOOK_API_KEY: process.env.NEXT_PUBLIC_GROWTHBOOK_API_KEY,
Expand Down Expand Up @@ -93,12 +90,9 @@ module.exports = withSentryConfig(moduleExports, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

// authToken: `${process.env.SENTRY_AUTH_TOKEN}`,
authToken: `${process.env.SENTRY_AUTH_TOKEN}`,
org: 'bcgov-ccbc-yr',
project: 'ccbc',
sourcemaps: {
disable: true,
},

// Only print logs for uploading source maps in CI
silent: !process.env.CI,
Expand Down

0 comments on commit d5a272e

Please sign in to comment.