From d54b99c0c9829300ce980ab043984594f52dab29 Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Mon, 28 Oct 2024 10:23:01 -0400 Subject: [PATCH 1/4] - Update script to use env specific vars for staging --- scripts/deploy-backend.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/deploy-backend.sh b/scripts/deploy-backend.sh index a1e3f2583..3c33dfdd7 100755 --- a/scripts/deploy-backend.sh +++ b/scripts/deploy-backend.sh @@ -71,9 +71,19 @@ set_cf_envs() cf_cmd="cf unset-env $CGAPPNAME_BACKEND $var_name ${!var_name}" $cf_cmd continue - elif [[ ("$var_name" =~ "STAGING_") && ("$CF_SPACE" = "tanf-staging") ]]; then - sed_var_name=$(echo "$var_name" | sed -e 's@STAGING_@@g') - cf_cmd="cf set-env $CGAPPNAME_BACKEND $sed_var_name ${!var_name}" + # TODO: REMOVE DEV TESTING CODE + elif [[("$CF_SPACE" = "tanf-dev") ]]; then + var_value=${!var_name} + staging_var="STAGING_$var_name" + if [[ "${!staging_var}" ]]; then + echo . + echo . + echo SETTING UNIQUE VALUE FOR $staging_var SPECIFIC VARIABLE + echo . + echo . + var_value=${!staging_var} + fi + cf_cmd="cf set-env $CGAPPNAME_BACKEND $var_name ${var_value}" else cf_cmd="cf set-env $CGAPPNAME_BACKEND $var_name ${!var_name}" fi From d9d26800c334572d709ce72b59c57fca931fd7f6 Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Wed, 30 Oct 2024 13:28:43 -0400 Subject: [PATCH 2/4] - remove var --- scripts/deploy-backend.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/deploy-backend.sh b/scripts/deploy-backend.sh index 3c33dfdd7..8bb91f0b8 100755 --- a/scripts/deploy-backend.sh +++ b/scripts/deploy-backend.sh @@ -58,7 +58,6 @@ set_cf_envs() "LOGGING_LEVEL" "REDIS_URI" "JWT_KEY" - "STAGING_JWT_KEY" "SENDGRID_API_KEY" ) From 5ed255111199ca3b6597baa3f8f0bcf3218f5bd3 Mon Sep 17 00:00:00 2001 From: Andrew <84722778+andrew-jameson@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:09:43 -0500 Subject: [PATCH 3/4] Update scripts/deploy-backend.sh --- scripts/deploy-backend.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/deploy-backend.sh b/scripts/deploy-backend.sh index 35c1d1d84..fe3ec4303 100755 --- a/scripts/deploy-backend.sh +++ b/scripts/deploy-backend.sh @@ -75,11 +75,6 @@ set_cf_envs() var_value=${!var_name} staging_var="STAGING_$var_name" if [[ "${!staging_var}" ]]; then - echo . - echo . - echo SETTING UNIQUE VALUE FOR $staging_var SPECIFIC VARIABLE - echo . - echo . var_value=${!staging_var} fi cf_cmd="cf set-env $CGAPPNAME_BACKEND $var_name ${var_value}" From d51a85d4061460c8aa0ee82937f8d7c6ec1ee4b6 Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Thu, 14 Nov 2024 14:56:21 -0500 Subject: [PATCH 4/4] - remove dev test code --- scripts/deploy-backend.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/deploy-backend.sh b/scripts/deploy-backend.sh index 35c1d1d84..c4ab36e2b 100755 --- a/scripts/deploy-backend.sh +++ b/scripts/deploy-backend.sh @@ -70,16 +70,10 @@ set_cf_envs() cf_cmd="cf unset-env $CGAPPNAME_BACKEND $var_name ${!var_name}" $cf_cmd continue - # TODO: REMOVE DEV TESTING CODE - elif [[("$CF_SPACE" = "tanf-dev") ]]; then + elif [[ ("$CF_SPACE" = "tanf-staging") ]]; then var_value=${!var_name} staging_var="STAGING_$var_name" if [[ "${!staging_var}" ]]; then - echo . - echo . - echo SETTING UNIQUE VALUE FOR $staging_var SPECIFIC VARIABLE - echo . - echo . var_value=${!staging_var} fi cf_cmd="cf set-env $CGAPPNAME_BACKEND $var_name ${var_value}"