Repository navigation
ci: deploy only after every check passes, and test the live image - #46
Merged
Merged
Conversation
CI never built deploy/Dockerfile, the image the live site runs. A new job runs scripts/deploy-image-smoke.sh whenever an app, deploy/ or render.yaml changes: build the image, boot it under 512 MB with the demo reset against a throwaway database, check login, the API and the security headers, then restart it and check the reset. A deliberately broken boot fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Render deployed on every push to main without looking at CI. With autoDeployTrigger: checksPass a commit goes live only once all its checks, the deploy image smoke included, have passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Nothing stopped a commit that fails CI from going live: Render deployed on every push to
mainwithout looking at CI,mainhas no branch protection, and CI never builtdeploy/Dockerfile, the image the live site runs.What
render.yaml:autoDeployTrigger: checksPass. Render deploys a commit only after every check on it passes; a failing commit never goes live. Every push tomainhas at least thedetectcheck, so a commit with zero checks (which Render never deploys) cannot happen.scripts/deploy-image-smoke.sh: buildsdeploy/Dockerfile, boots it under 512 MB with the demo reset against a throwaway Postgres and Redis, checks login 200, API ok and the 5 security headers, then restarts it and checks the reset. Runs the same on a laptop.changes.yml: adeploypath filter (deploy/**,render.yaml) and a deploy image smoke job that runs when an app or the deploy files change.Verified
start.shmade to exit before migrating, it fails with "the container exited"; restored, no diff.docker logs | grep -qunderpipefailreports failure on a match (grep exits early, the writer is cut off); output is captured first.Still the owner's step
Branch protection on
mainrequiring these checks, so a failing PR cannot be merged either. Until then a failing PR can still be merged; it just never goes live.🤖 Generated with Claude Code