Skip to content

Commit

Permalink
fix(sentry): add variable to allow artifact upload (#144)
Browse files Browse the repository at this point in the history
* fix(sentry): add variable to allow artifact upload

* fix(sentry): add missing variables

* fix: typo

* test: install `ca-certificates`

* fix: typo

* fix: add `-y` and clean cache
  • Loading branch information
JeffreyArt1 authored Dec 11, 2023
1 parent 2148ca6 commit 97914ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/sub-build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ jobs:
NEXT_PUBLIC_GTM_ID=${{ vars.NEXT_PUBLIC_GTM_ID }}
NEXT_PUBLIC_ORY_SDK_URL=${{ vars.NEXT_PUBLIC_ORY_SDK_URL }}
NEXT_PUBLIC_SENTRY_DSN=${{ vars.NEXT_PUBLIC_SENTRY_DSN }}
SENTRY_ORG=${{ vars.SENTRY_ORG }}
SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
secrets: |
"AWS_EXPORTS_JSON=${{ secrets.AWS_EXPORTS_JSON || ''}}"
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ ENV NEXT_PUBLIC_ORY_SDK_URL=${NEXT_PUBLIC_ORY_SDK_URL}
ARG NEXT_PUBLIC_SENTRY_DSN
ENV NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN}

ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}

ARG SENTRY_ORG
ENV SENTRY_ORG=${SENTRY_ORG}

ARG SENTRY_PROJECT
ENV SENTRY_PROJECT=${SENTRY_PROJECT}

# Install corepack and set pnpm as default package manager
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
Expand All @@ -45,6 +54,12 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-l
# Rebuild the source code only when needed
FROM base AS build

RUN <<EOF
apt-get update
apt-get install -y ca-certificates
rm -rf /var/lib/apt/lists/*
EOF

COPY --from=deps ${WORK_DIR}/node_modules ./node_modules
COPY . .

Expand Down
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ const nextConfig = {
};

const { withSentryConfig } = require('@sentry/nextjs');
const { version: release } = require('./package.json');
const { version, name } = require('./package.json');

module.exports = withSentryConfig(
nextConfig,
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

release,
release: `${name}@${version}`,
cleanArtifacts: true,
// Suppresses source map uploading logs during build
silent: true,
Expand Down

0 comments on commit 97914ab

Please sign in to comment.