fix(ci): robust prod deploy — remove dev-health gate, kill tier-clobbering sed, rm -f before recreate #758
Reference in New Issue
Block a user
Delete Branch "fix/deploy-mokogitea-robustness"
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?
Repairs
deploy-mokogitea.yml(prod deploy,on: push [main]) after it failed the #733 release and silently corrupted the shared compose. Three distinct false-negative / damage sources fixed:1. Cross-tier false-negative gate (removed)
Step 0 "Verify dev environment is healthy" curled
git.dev/api/healthzandexit 1on failure — gating a PROD deploy on a live DEV health check. A transient dev blip false-negatives the prod deploy. Removed; thedev → rc → mainpipeline + RC env is the real pre-prod gate.2. Tier-clobbering
sed(replaced with env-var pattern)sed -i 's|mokogitea:[^ ]*|mokogitea:$TAG|'matched everymokogitea:line in the shared compose — it overwrote the dev and rc services'${MOKOGITEA_DEV_TAG}/${MOKOGITEA_RC_TAG}env-vars with the prod tag (confirmed: dev+rc lines were clobbered tostable-289, dev container ended up running the prod image). Replaced withenv $TAG_ENV="$TAG" docker compose updriving only the target service — no sed.3. Container-name conflict (the actual failure)
docker compose up -d $CONTAINERwithout removing the fixed-name container + wrong compose project →Container name "/mokogitea" is already in use. Now:docker rm -f $CONTAINER+-p gitea-dev+--force-recreate.Aligns
deploy-mokogitea.ymlwith the already-fixeddeploy-dev/deploy-rcpattern. The host compose was separately restored to env-var form for all three tiers (the bad run's damage). The #733 release itself is live + healthy (completed via manual fallback).Long-term: cut over Template-Go#5
deploy-prod.ymlto retire this custom copy. Refs #733, #752.https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
Wiki reminder: docs are wiki-first -- if this PR changes behavior, usage, config, or standards, please update the repo wiki before/after merge. (non-blocking)