Add environment variable handling for CI builds in internal_frontend
This commit is contained in:
@@ -10,6 +10,15 @@ build_internal_frontend:
|
|||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
cd internal_frontend
|
cd internal_frontend
|
||||||
|
echo "KEYCLOAK_ISSUER=$KEYCLOAK_ISSUER" > .env
|
||||||
|
echo "NEXTAUTH_SECRET=$NEXTAUTH_SECRET" >> .env
|
||||||
|
if [ "$CI_COMMIT_REF_NAME" = "production" ]; then
|
||||||
|
echo "KEYCLOAK_CLIENT_ID=$KEYCLOAK_CLIENT_ID_PROD" >> .env
|
||||||
|
echo "KEYCLOAK_CLIENT_SECRET=$KEYCLOAK_CLIENT_SECRET_PROD" >> .env
|
||||||
|
else
|
||||||
|
echo "KEYCLOAK_CLIENT_ID=$KEYCLOAK_CLIENT_ID_TEST" >> .env
|
||||||
|
echo "KEYCLOAK_CLIENT_SECRET=$KEYCLOAK_CLIENT_SECRET_TEST" >> .env
|
||||||
|
fi
|
||||||
npm install
|
npm install
|
||||||
npx next build
|
npx next build
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|||||||
Reference in New Issue
Block a user