-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(CI): Add docker build and curl check #214
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM though I think we should lower the sleep and timeout
scripts/wait-for.sh
Outdated
if curl -X GET 'http://localhost:6666/health'; then | ||
exit 0 | ||
else | ||
sleep 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sleep 2 is prob better? otherwise the ci takes minimum 20seconds given Id assume the first ping is not going to work because container is still being spun up.
scripts/wait-for.sh
Outdated
# poll the proxy endpoint until we get a 0 return code or 5mins have passed, in that case exit 1 | ||
timeout_time=$(($(date +%s) + 300)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prob 2 mins is enough? I personally prefer cis to crash fast and I can restart them manually (restarting on a separate machine might also fix a problem if it was github/azure related)
Changes proposed
Introduces a new CI job which asserts that the server can be built into a docker container. The job also ensures that the health endpoint can be successfully pinged. This is done to avoid regressions where container builds fail on main when publishing to ghcr.