Skip to content

Commit

Permalink
create-cf-space-toolsmiths: try fixing shepherd env failures
Browse files Browse the repository at this point in the history
  • Loading branch information
arjun024 committed Jan 4, 2024
1 parent 90fb59a commit 6f296f1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/create-cf-space-toolsmiths/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ ops_manager_password="$(jq -r .ops_manager.password environment/metadata)"
ops_manager_url="$(jq -r .ops_manager.url environment/metadata)"

TARGET="$(jq -r .cf.api_url environment/metadata)"
# .cf may not be available on non-cfd envs
if [ -z "${TARGET}" ] || [ "${TARGET}" == "null" ]; then
TARGET="$(jq -r .sys_domain environment/metadata | sed 's/sys\./api\./')"
fi
if [ -z "${TARGET}" ] || [ "${TARGET}" == "null" ]; then
echo "api url could not be calculated from .cf or .sys_domain from the metadata"
exit 1
fi

USERNAME="admin"
PASSWORD="$(om \
--target "$ops_manager_url" \
Expand Down

0 comments on commit 6f296f1

Please sign in to comment.