Skip to content

Commit

Permalink
fix env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jul 12, 2023
1 parent 1914914 commit 6868daa
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,9 @@ jobs:
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# Needed because next/sveltekit expects a prefix
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }}
Expand All @@ -854,6 +857,9 @@ jobs:
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# Needed because next/sveltekit expects a prefix
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ jobs:
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# Needed because next/sveltekit expects a prefix
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }}
Expand All @@ -117,6 +120,9 @@ jobs:
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# Needed because next/sveltekit expects a prefix
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }}
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-tests/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ async function run(): Promise<void> {
}

const envVarsToInject = {
REACT_APP_E2E_TEST_DSN: process.env.E2E_TEST_DSN,
REMIX_APP_E2E_TEST_DSN: process.env.E2E_TEST_DSN,
NEXT_PUBLIC_E2E_TEST_DSN: process.env.E2E_TEST_DSN,
PUBLIC_E2E_TEST_DSN: process.env.E2E_TEST_DSN,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Sentry from '@sentry/nextjs';

Sentry.init({
environment: 'qa', // dynamic sampling bias to keep transactions
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
dsn: process.env.E2E_TEST_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { hydrateRoot } from 'react-dom/client';
import * as Sentry from '@sentry/remix';

Sentry.init({
dsn: process.env.REMIX_APP_E2E_TEST_DSN,
dsn: process.env.E2E_TEST_DSN,
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.remixRouterInstrumentation(useEffect, useLocation, useMatches),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as Sentry from '@sentry/remix';
const ABORT_DELAY = 5_000;

Sentry.init({
dsn: process.env.REMIX_APP_E2E_TEST_DSN,
dsn: process.env.E2E_TEST_DSN,
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const replay = new Sentry.Replay();

Sentry.init({
// environment: 'qa', // dynamic sampling bias to keep transactions
dsn: process.env.REACT_APP_E2E_TEST_DSN,
dsn: process.env.E2E_TEST_DSN,
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.reactRouterV6Instrumentation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import User from './pages/User';

Sentry.init({
environment: 'qa', // dynamic sampling bias to keep transactions
dsn: process.env.REACT_APP_E2E_TEST_DSN,
dsn: process.env.E2E_TEST_DSN,
integrations: [
new BrowserTracing({
routingInstrumentation: Sentry.reactRouterV6Instrumentation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const replay = new Sentry.Replay();

Sentry.init({
environment: 'qa', // dynamic sampling bias to keep transactions
dsn: process.env.REACT_APP_E2E_TEST_DSN,
dsn: process.env.E2E_TEST_DSN,
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.reactRouterV6Instrumentation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Sentry.init({
environment: 'qa', // dynamic sampling bias to keep transactions
dsn: env.PUBLIC_E2E_TEST_DSN,
debug: true,
tunnel: `http://localhost:${
Number(env.PUBLIC_BASE_PORT) + Number(env.PUBLIC_PORT_MODULO) + Number(env.PUBLIC_PORT_GAP)
}/`, // proxy server
tunnel: `http://localhost:9001/`, // proxy server
tracesSampleRate: 1.0,
});

Expand Down

0 comments on commit 6868daa

Please sign in to comment.