diff --git a/.github/workflows/cclf-import-test-integration.yml b/.github/workflows/cclf-import-test-integration.yml index 3af25a024..78bc4f8cd 100644 --- a/.github/workflows/cclf-import-test-integration.yml +++ b/.github/workflows/cclf-import-test-integration.yml @@ -96,8 +96,17 @@ jobs: FILENAME: ${{needs.trigger.outputs.filename}} # CAUTION: if changing the script below, validate that sensitive information is not printed in the workflow run: | + log() { + local level="$1" + shift + echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" + } + HOST=$(aws rds describe-db-instances --db-instance-identifier bcda-test-rds 2>&1 | jq -r '.DBInstances[0].Endpoint.Address' 2>&1) + log "DEBUG" "Retrieved host: $HOST" + CONNECTION_URL=$(echo $CONNECTION_INFO 2>&1 | sed -E "s/@.*\/bcda/\@$HOST\/bcda/" 2>&1) + log "DEBUG" "Updated connection URL: $CONNECTION_URL" # Verify that we have a record of the CCLF file in the database CCLF_FILE=`psql -t "$CONNECTION_URL" -c "SELECT id FROM cclf_files WHERE name = '$FILENAME' LIMIT 1" 2>&1`