ci: docDB int test wait for appsmith health before cypress (#26655)
This commit is contained in:
parent
193f4849a7
commit
1f5223c01d
|
|
@ -331,6 +331,10 @@ jobs:
|
|||
echo "COMMIT_INFO_MESSAGE=$(echo \"${{ env.EVENT_COMMITS }}\" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Wait until appsmith server is healthy
|
||||
run: |
|
||||
bash scripts/health_check.sh
|
||||
|
||||
- name: Run the cypress test
|
||||
if: steps.run_result.outputs.run_result != 'success' && steps.run_result.outputs.run_result != 'failedtest'
|
||||
id: cypress_test
|
||||
|
|
|
|||
13
scripts/health_check.sh
Normal file
13
scripts/health_check.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
endpoint="http://localhost/api/v1/health"
|
||||
status_code=0
|
||||
|
||||
while [ $status_code -ne 200 ]; do
|
||||
response=$(curl -s -o /dev/null -w "%{http_code}" "$endpoint")
|
||||
status_code=$response
|
||||
|
||||
if [ $status_code -ne 200 ]; then
|
||||
echo "Response status code: $status_code. Retrying..."
|
||||
sleep 30
|
||||
fi
|
||||
done
|
||||
Loading…
Reference in New Issue
Block a user