add jq smoke check with retry
All checks were successful
Deploy to my-vpn / deploy (push) Successful in 34s
All checks were successful
Deploy to my-vpn / deploy (push) Successful in 34s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,11 @@ jobs:
|
||||
run: |
|
||||
python3 -m unittest discover -s tests
|
||||
|
||||
- name: Install jq
|
||||
run: |
|
||||
apt-get update -y
|
||||
apt-get install -y jq
|
||||
|
||||
- name: Deploy via SSH
|
||||
env:
|
||||
VPN_HOST: ${{ secrets.VPN_HOST }}
|
||||
@@ -35,4 +40,11 @@ jobs:
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=10 -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_ci_runner "${VPN_USER}@${VPN_HOST}" "echo ok"
|
||||
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=10 -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_ci_runner "${VPN_USER}@${VPN_HOST}" "cd /srv/ip-ua && git fetch --all && git reset --hard origin/main && bash deploy/my-vpn/deploy.sh"
|
||||
curl -fsS "http://${VPN_HOST}" | head -c 200
|
||||
for i in $(seq 1 10); do
|
||||
if curl -fsS "http://${VPN_HOST}" -o /tmp/resp.json; then
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
jq -e '.ip and .user_agent and .method and .path and .timestamp' /tmp/resp.json >/dev/null
|
||||
echo "smoke ok"
|
||||
|
||||
Reference in New Issue
Block a user