Skip to content

Commit

Permalink
fix: extract SYSTEM_DOMAIN correctly from toolsmiths-env/metadata file (
Browse files Browse the repository at this point in the history
#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]
  • Loading branch information
peterhaochen47 authored Dec 27, 2023
1 parent 0cbf33a commit e119281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared-functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e119281

Please sign in to comment.