Skip to content

Commit bdfd08e

Browse files
Merge pull request #133 from quotentiroler/dev/testing
πŸ”„ Auto-PR: Merge `dev/testing` β†’ `develop`
2 parents 2eeba23 + 00d307c commit bdfd08e

2 files changed

Lines changed: 36 additions & 4 deletions

File tree

β€Ž.github/workflows/deployment-strategy.ymlβ€Ž

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,32 @@ jobs:
9696
quay.io/keycloak/keycloak:26.2 start-dev
9797
9898
# Wait for Keycloak
99-
echo "⏳ Waiting for Keycloak..."
100-
timeout 180s bash -c 'until curl -f http://localhost:8080/health/ready; do sleep 5; done'
99+
echo "⏳ Waiting for Keycloak to be ready..."
100+
max_attempts=30
101+
attempt=1
102+
103+
while [ $attempt -le $max_attempts ]; do
104+
echo "πŸ”„ Checking Keycloak health... (attempt $attempt/$max_attempts)"
105+
106+
# Just check if the port is responding and returns any HTTP response
107+
if curl -s --connect-timeout 5 --max-time 10 http://localhost:8080 >/dev/null 2>&1; then
108+
echo "βœ… Keycloak is responding on port 8080"
109+
# Give it a few more seconds to fully initialize
110+
sleep 5
111+
break
112+
else
113+
echo "⏳ Keycloak not responding yet, waiting..."
114+
sleep 10
115+
attempt=$((attempt + 1))
116+
fi
117+
done
118+
119+
if [ $attempt -gt $max_attempts ]; then
120+
echo "❌ Keycloak failed to start within timeout"
121+
echo "πŸ“‹ Checking Keycloak container logs..."
122+
docker logs alpha-keycloak --tail 50
123+
exit 1
124+
fi
101125
102126
# Build and start the backend
103127
echo "πŸ—οΈ Building and starting FHIR backend..."
@@ -331,4 +355,10 @@ jobs:
331355
echo "- **Target**: ${{ steps.set-outputs.outputs.deployment_target }}" >> $GITHUB_STEP_SUMMARY
332356
echo "- **FHIR Server**: ${{ steps.set-outputs.outputs.fhir_server_url }}" >> $GITHUB_STEP_SUMMARY
333357
echo "- **Keycloak**: ${{ steps.set-outputs.outputs.keycloak_url }}" >> $GITHUB_STEP_SUMMARY
334-
echo "- **Status**: βœ… Success" >> $GITHUB_STEP_SUMMARY
358+
359+
# Check if deployment actually succeeded
360+
if [ "${{ steps.set-outputs.outputs.deployment_status }}" = "success" ]; then
361+
echo "- **Status**: βœ… Success" >> $GITHUB_STEP_SUMMARY
362+
else
363+
echo "- **Status**: ❌ Failed" >> $GITHUB_STEP_SUMMARY
364+
fi

β€Ž.github/workflows/testing-strategy.ymlβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ jobs:
113113
echo "Testing OAuth discovery endpoint..."
114114
if curl -f "${{ inputs.keycloak_url }}/realms/proxy-smart/.well-known/openid_configuration" > testing/${{ inputs.test_stage }}/reports/integration/oauth_discovery.json; then
115115
echo "βœ… OAuth discovery endpoint working"
116+
elif curl -f "${{ inputs.keycloak_url }}/realms/master/.well-known/openid_configuration" > testing/${{ inputs.test_stage }}/reports/integration/oauth_discovery_master.json; then
117+
echo "βœ… Keycloak master realm accessible (proxy-smart realm may not be configured yet)"
116118
else
117-
echo "⚠️ OAuth discovery endpoint not available"
119+
echo "⚠️ OAuth discovery endpoint not available - Keycloak may not be fully configured"
118120
fi
119121
120122
echo "status=passed" >> $GITHUB_OUTPUT

0 commit comments

Comments
Β (0)