From 96452dcd6fb7343532fa7e86c4d3ac7f0c04179f Mon Sep 17 00:00:00 2001 From: Andrew <84722778+andrew-jameson@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:44:47 -0400 Subject: [PATCH] Debug/develop deployment failures (#2743) * Update cloudgov.py * hijack develop workflow to test deployments. * syntax typo. * I can't believe this typo. * linting whitespace * removed extra space * Adding in staging jwt_key due to recent deployment failure. * Removing self-reference branch filter for mergability * Updated elif logic based on CI failures --------- Co-authored-by: andrew-jameson Co-authored-by: George Hudson --- scripts/deploy-backend.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/deploy-backend.sh b/scripts/deploy-backend.sh index 7fb1fb657..ec372396a 100755 --- a/scripts/deploy-backend.sh +++ b/scripts/deploy-backend.sh @@ -64,11 +64,13 @@ 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 - var_name=$(echo "$var_name" | sed -e 's@STAGING_@@g') + 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}" + else + cf_cmd="cf set-env $CGAPPNAME_BACKEND $var_name ${!var_name}" fi - - cf_cmd="cf set-env $CGAPPNAME_BACKEND $var_name ${!var_name}" + echo "Setting var : $var_name" $cf_cmd done