You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Switch script/prod to the fail-closed DEPLOY_TAG default once hosts are past 0.3.0 #35
The README and SPEC recommend that a project's compose wrapper default DEPLOY_TAG and fail closed, so a manual script/prod up -d on a host never silently moves services to :latest:
if [ -z"${DEPLOY_TAG:-}" ];then
DEPLOY_TAG=$(flow-deploy tag)|| {
echo"script/prod: set DEPLOY_TAG (flow-deploy tag couldn't tell)">&2exit 1
}
export DEPLOY_TAG
fi
This repo's own script/prod (used to deploy the docs site) doesn't do this yet. That's deliberate for the release that ships #31.
Why not yet
flow-deploy 0.3.0 renders <compose-command> config through script/prodwithoutDEPLOY_TAG, after checking out the new commit. If the fail-closed wrapper shipped in the same release, any deploy run by a still-0.3.0 binary would call flow-deploy tag (a command 0.3.0 doesn't have) from inside the wrapper, exit 1, and fail. For example: a host whose upgrade step was skipped.
Versions after #31 pass DEPLOY_TAG on every compose call, so the wrapper's lookup never runs from inside flow-deploy.
Proposal
Once every host that deploys this repo runs a flow-deploy newer than 0.3.0, switch script/prod to the fail-closed snippet above.
Size
Trivial: about 7 lines in script/prod. Check first: flow-deploy --version for the deploy user on each host.
Activity