- enabled_targets/names_for: one implementation of 'a host acts only on its own targets'; --host s5 and --host s5.fisher.hu now select the same targets - shell_value: JSON booleans reach shell consumers as true/false - cd-status: capture before eval, so the unconfigured-host branch is reachable - cd-deploy writes a .status record; cd-status reads it instead of grepping the log's prose - cd-render-hooks --list-urls replaces two inline JSON readers
2.0 KiB
Hints
Short notes on things that were not obvious. Prune stale ones.
-
bin/cd-targetcannot be imported normally. The hyphen in the filename is not a valid Python identifier, sobin/cd-render-hooksloads it throughimportlib.machinery.SourceFileLoader. Importingimportlib.utilalone is not enough —importlib.machineryneeds its own import. -
if eval "$(cmd)"tests the wrong thing.evalreports the status of the string it evaluates, and an empty string is success — so a failingcmdmakes theiftake the true branch with nothing assigned, andset -uthen aborts on the first variable the branch reads. Capture first (if out="$(cmd)"; then eval "$out"). This had madecd-status's "host is not configured" message unreachable. -
docker/metadata-action'stype=sha,format=shortproduces 7 characters. That is whyimage_tag_templateuses{short7}. domaindingo'sbuild.ymlprefixes it with the branch, givingtest-sha-abc1234/prod-sha-abc1234. -
domaindingo's compose stacks are not in the domaindingo repo. Test and prod both live in
sysadmin/uas-ngatdocker/domaindingo/s5.fisher.hu/(docker-compose.ymlanddocker-compose-prod.yml). Thescripts/deploy-*.shfiles still in the application repo point at compose files that do not exist on s5 — they are dead code for both environments that matter. -
domaindingo test and prod both run on s5, not s2. Only dev is still on s2. The
hostname != s2guard in the old scripts therefore matched nothing andexit 0d, which reads as success. -
Registry tags in this fleet have drifted before.
domaindingo:0.1.149once resolved to a different image than the one running, with a broken/login. This is whycd-deploychecksorg.opencontainers.image.revisionand deploys by digest. -
docker compose down -vdestroys the data volumes for these stacks. The retired paradicsomleves test script used it.cd-deployonly ever runsup -d.