ORCH-3 (S-3) + M-5: safe deploy rollback + infra hardcode cleanup #20
Reference in New Issue
Block a user
Delete Branch "feature/ORCH-3-deploy-rollback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
S-3 — safe rollback
Remove dangerous git checkout $LAST_TAG from deployer.md (detached HEAD in shared repo, breaks next pull, does NOT roll back prod). Rollback now via deploy hook: ssh ... bash ${HOOK} --rollback. Narrowed deployer tools to Bash (git, curl).
Hook (NOT in repo, /home/slin/bin/enduro-deploy-hook.sh): candidate staged as .new + backup .bak-*. Saves running image to .deploy-prev-image before restart; --rollback retags prev image to enduro-trails-app:latest and restarts via docker compose up -d --no-build app, or logs skipped+exit1 if nothing. Happy-path + set -e intact. bash -n OK, prod dry-run (read-only/throwaway tag) verified. Apply to prod = Stream/Slava step.
M-5 — infra hardcode
architect.md host -> ${DEPLOY_SSH_HOST:-mva154}; tester.md -> ${REPO_DIR:-...}, ${UI_TEST_RUNNER:-...}. Defaults preserve behavior.
Do NOT merge — Stream decides merge + prod hook apply.
Remove dangerous git checkout $LAST_TAG from deployer prompt: it left the shared working copy in detached HEAD (breaking the next git pull) and did not roll back prod at all. Rollback now goes through the deploy hook (ssh ... bash ${HOOK} --rollback), which restores the app container to the previously running image. Narrow tools to Bash (git, curl) since the deployer no longer invokes docker directly.architect.md: server host 82.22.50.71/mva154 -> ${DEPLOY_SSH_HOST:-mva154}. tester.md: repo path -> ${REPO_DIR:-...}, ui-test runner -> ${UI_TEST_RUNNER:-...}. Defaults preserve current behavior; prompts become portable.