Skip to content

Commit

Permalink
Merge pull request #275 from NHSDigital/AMB-0008-Fixing-prod-test-for…
Browse files Browse the repository at this point in the history
…-terraform

AMB-0008-Fixing-prod-test-for-terraform
  • Loading branch information
Valswyn-NHS authored Nov 4, 2024
2 parents 6313fdf + 4c81299 commit d550928
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion azure/templates/post-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@ steps:
counter=0
base_path="$SERVICE_BASE_PATH"
endpoint="https://${APIGEE_ENVIRONMENT}.api.service.nhs.uk/${base_path}/_status"
endpoint=""
if [[ $APIGEE_ENVIRONMENT =~ "prod" ]]; then
endpoint="https://api.service.nhs.uk/${base_path}/_status"
else
endpoint="https://${APIGEE_ENVIRONMENT}.api.service.nhs.uk/${base_path}/_status"
fi
while [[ $counter -lt 11 ]]; do
response=$(curl -H "apikey: $(status-endpoint-api-key)" -s "$endpoint")
response_code=$(jq -r '.checks.healthcheck.responseCode' <<< "$response")
Expand Down

0 comments on commit d550928

Please sign in to comment.