Files
state-corp-backend/scripts/ci/smoke.sh
Aleksandr Meshchriakov 9194ff3d0d
Some checks failed
State Corp Backend CI/CD / Quality gate (push) Successful in 5m25s
State Corp Backend CI/CD / Build linux/amd64 images once (push) Successful in 2m44s
State Corp Backend CI/CD / Release dev (push) Failing after 8s
State Corp Backend CI/CD / Refresh and release internal main (push) Has been skipped
State Corp Backend CI/CD / Release customer main (push) Has been skipped
feat: add sanitized internal main deployment
2026-08-27 12:49:43 +03:00

27 lines
533 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
smoke_url="${1:-}"
[[ "${smoke_url}" =~ ^https?:// ]] || {
printf 'a complete http(s) smoke URL is required\n' >&2
exit 1
}
for attempt in $(seq 1 24); do
if curl --fail --silent \
--connect-timeout 5 \
--max-time 15 \
--output /dev/null \
"${smoke_url}"; then
printf 'Smoke check passed.\n'
exit 0
fi
printf 'Smoke attempt %s/24 failed; retrying in 5 seconds.\n' "${attempt}" >&2
sleep 5
done
printf 'Smoke check failed after 24 attempts.\n' >&2
exit 1