🐛 Fix nx-ignore command on CI

This commit is contained in:
Baptiste Arnaud 2026-03-19 09:37:55 +01:00
parent 00e770dbee
commit db2a3e2ffa
No known key found for this signature in database
3 changed files with 38 additions and 37 deletions

View File

@ -25,19 +25,8 @@ WORKDIR /app
FROM base AS builder
ARG SCOPE
COPY . .
RUN SKIP_ENV_CHECK=true \
DATABASE_URL=postgresql:// \
ENCRYPTION_SECRET=12345678901234567890123456789012 \
NEXTAUTH_URL=http://localhost:3000 \
NEXT_PUBLIC_VIEWER_URL=http://localhost:3001 \
SENTRYCLI_SKIP_DOWNLOAD=1 \
bun install --frozen-lockfile
RUN SKIP_ENV_CHECK=true \
DATABASE_URL=postgresql:// \
ENCRYPTION_SECRET=12345678901234567890123456789012 \
NEXTAUTH_URL=http://localhost:3000 \
NEXT_PUBLIC_VIEWER_URL=http://localhost:3001 \
bunx nx build ${SCOPE}
RUN SENTRYCLI_SKIP_DOWNLOAD=1 bun install --frozen-lockfile
RUN SKIP_ENV_CHECK=true NEXT_PUBLIC_VIEWER_URL=http://localhost bunx nx build ${SCOPE}
RUN DATABASE_URL=postgresql:// bunx nx db:generate prisma
# ================== RELEASE ======================

View File

@ -1,7 +1,6 @@
import { dirname, join } from "node:path";
import { withSentryConfig } from "@sentry/nextjs";
import "@typebot.io/env/compiled";
import { fileURLToPath } from "node:url";
import { withSentryConfig } from "@sentry/nextjs";
import { configureRuntimeEnv } from "next-runtime-env/build/configure.js";
const __filename = fileURLToPath(import.meta.url);
@ -93,13 +92,20 @@ const nextConfig = {
},
};
export default process.env.SENTRY_DSN
? withSentryConfig(nextConfig, {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
widenClientFileUpload: true,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
})
: nextConfig;
export default async function config() {
// Avoid loading env package when NX is creating the graph (nx-ignore command)
if (global.NX_GRAPH_CREATION) return nextConfig;
await import("@typebot.io/env/compiled");
return process.env.SENTRY_DSN
? withSentryConfig(nextConfig, {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
widenClientFileUpload: true,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
})
: nextConfig;
}

View File

@ -1,7 +1,6 @@
import { dirname, join } from "node:path";
import { withSentryConfig } from "@sentry/nextjs";
import "@typebot.io/env/compiled";
import { fileURLToPath } from "node:url";
import { withSentryConfig } from "@sentry/nextjs";
import { configureRuntimeEnv } from "next-runtime-env/build/configure.js";
const __filename = fileURLToPath(import.meta.url);
@ -154,13 +153,20 @@ const nextConfig = {
},
};
export default process.env.SENTRY_DSN && process.env.SENTRY_AUTH_TOKEN
? withSentryConfig(nextConfig, {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
widenClientFileUpload: true,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
})
: nextConfig;
export default async function config() {
// Avoid loading env package when NX is creating the graph (nx-ignore command)
if (global.NX_GRAPH_CREATION) return nextConfig;
await import("@typebot.io/env/compiled");
return process.env.SENTRY_DSN
? withSentryConfig(nextConfig, {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
widenClientFileUpload: true,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
})
: nextConfig;
}