Skip to content

Commit

Permalink
feat(cd): added healthcheck step in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jul 1, 2024
1 parent 1d4f607 commit b928f8d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/deploy-ntfy-do.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,23 @@ jobs:
cd "${PROJECT_DIR}/"
sudo docker compose down
sudo docker compose up -d
healthcheck:
name: Healthcheck Stage
needs: deploy
runs-on: ubuntu-latest

steps:
- name: Check for the health of Naarad
run: |
while true; do
result=$(curl -s -kX GET https://naarad.metakgp.org/v1/health | jq '.healthy')
if [ "$result" = "true" ]; then
echo "Health check passed. Service is healthy."
break
else
echo "Service not healthy yet. Retrying in 5 seconds..."
sleep 5
fi
done

0 comments on commit b928f8d

Please sign in to comment.