From c5abb702d55104ea999b26ab164536eeeb138b69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me>
Date: Wed, 15 Nov 2023 21:17:24 +0100
Subject: [PATCH] CI/CD => dotenv for test

---
 NodeApp/.gitlab-ci/01_functions.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NodeApp/.gitlab-ci/01_functions.yml b/NodeApp/.gitlab-ci/01_functions.yml
index 8bef56b..b2c4f61 100644
--- a/NodeApp/.gitlab-ci/01_functions.yml
+++ b/NodeApp/.gitlab-ci/01_functions.yml
@@ -78,7 +78,7 @@
 
         # Decrypt env vars for production
         - |
-            if [ $CI_COMMIT_REF_PROTECTED == "true" ]; then
+            if [ $CI_COMMIT_REF_PROTECTED == "true" || $IS_TEST == true ]; then
                 echo "Decrypt production env vars"
                 sed -i -r "s/(DOTENV_KEY[ ]*:[ ]*[\'\"\`])[^'\"\`]*([\'\"\`])([ ]*\,)?//g" src/app.ts
                 sed -i -r "s/,[\ \n]*\}/\}/g" src/app.ts
-- 
GitLab