From e32df994465e6e73d03cd72556ca0b27b63b7374 Mon Sep 17 00:00:00 2001 From: andrzej Date: Fri, 4 Oct 2024 15:11:59 +0200 Subject: [PATCH] make dot env file on build --- Jenkinsfile | 2 ++ src/app/api/auth/actions.ts | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b6f051b..f975188 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,6 +7,8 @@ agent any stages{ stage('build'){ steps{ + sh 'echo "JWT_SECRET=${JWT_SECRET}" | cat >> .env' + sh 'echo "DATABASE_URL=${DATABASE_URL}" | cat >> .env' sh 'npm install' sh 'npm run build' } diff --git a/src/app/api/auth/actions.ts b/src/app/api/auth/actions.ts index 254e94e..63519db 100644 --- a/src/app/api/auth/actions.ts +++ b/src/app/api/auth/actions.ts @@ -3,10 +3,6 @@ import prisma from 'app/lib/db'; import { jwtVerify, JWTPayload, decodeJwt, SignJWT } from 'jose'; import { cookies } from 'next/headers'; import { loginSchema, LoginSchema } from 'app/login/schema'; -import { loadEnvConfig } from '@next/env' - -const projectDir = process.cwd() -loadEnvConfig(projectDir)