From e119281843caa921a8d7e2871223b1fbe31afdd4 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Wed, 27 Dec 2023 15:10:21 -0800 Subject: [PATCH] fix: extract SYSTEM_DOMAIN correctly from toolsmiths-env/metadata file (#179) - Before this commit, the tasks assume that envs associated with the "toolsmiths-env" input are always under the domain "cf-app.com", which is no longer always the case. - Instead, extract the SYSTEM_DOMAIN from the CF API value provided by the "toolsmiths-env" input. [Fixes #178] --- shared-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-functions b/shared-functions index 3dff73c1..5e990442 100644 --- a/shared-functions +++ b/shared-functions @@ -86,7 +86,7 @@ function setup_bosh_env_vars() { set +x if [ -d toolsmiths-env ]; then eval "$(bbl print-env --metadata-file toolsmiths-env/metadata)" - export SYSTEM_DOMAIN="$(cat toolsmiths-env/metadata | jq -r .name).cf-app.com" + export SYSTEM_DOMAIN="$(cat toolsmiths-env/metadata | jq -r '.cf.api_url | sub("api."; "")')" export TCP_DOMAIN="tcp.${SYSTEM_DOMAIN}" else if [ -d bbl-state ]; then