Match house writing style, add docs/hints.md
This commit is contained in:
Binary file not shown.
+1
-1
@@ -134,7 +134,7 @@ notify() {
|
|||||||
-H "Title: ${CD_NAME} deploy" \
|
-H "Title: ${CD_NAME} deploy" \
|
||||||
-d "${icon} ${CD_NAME} (${CD_ENV}): ${message}" \
|
-d "${icon} ${CD_NAME} (${CD_ENV}): ${message}" \
|
||||||
"${CD_NTFY_BASE_URL}/${topic}" >/dev/null 2>&1 \
|
"${CD_NTFY_BASE_URL}/${topic}" >/dev/null 2>&1 \
|
||||||
|| warn "ntfy notification failed (deploy outcome itself is unaffected)"
|
|| warn "ntfy notification failed (the deploy itself is unaffected)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------- lock ---
|
# ------------------------------------------------------------------- lock ---
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Written because "the timer is active" was never proof of anything in this
|
# Written because "the timer is active" was never proof of anything in this
|
||||||
# fleet -- the same lesson the uas-ng updater documents. This shows the daemon,
|
# fleet -- the same lesson the uas-ng updater documents. This shows the daemon,
|
||||||
# the socket, and the outcome of the last deploy for each target.
|
# the socket, and how the last deploy for each target ended.
|
||||||
|
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ itself, so there is exactly one implementation of the matching rules.
|
|||||||
Subcommands:
|
Subcommands:
|
||||||
resolve --repo OWNER/NAME --branch BRANCH [--host HOST]
|
resolve --repo OWNER/NAME --branch BRANCH [--host HOST]
|
||||||
Print shell-quoted KEY=VALUE lines for the matching target.
|
Print shell-quoted KEY=VALUE lines for the matching target.
|
||||||
Exit 3 when nothing matches (a normal, non-error outcome: it just
|
Exit 3 when nothing matches (a normal, non-error result: it just
|
||||||
means this push is not ours to act on).
|
means this push is not ours to act on).
|
||||||
|
|
||||||
list [--host HOST]
|
list [--host HOST]
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ design.
|
|||||||
|
|
||||||
An active service is not proof of anything on its own — the same lesson the
|
An active service is not proof of anything on its own — the same lesson the
|
||||||
`uas-ng` updater documents. `cd-status` shows the daemon state, whether the port
|
`uas-ng` updater documents. `cd-status` shows the daemon state, whether the port
|
||||||
is genuinely listening, the hook endpoints, and the outcome of the last deploy
|
is genuinely listening, the hook endpoints, and how each target's last
|
||||||
per target.
|
deploy ended.
|
||||||
|
|
||||||
## Where things are
|
## Where things are
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Hints
|
||||||
|
|
||||||
|
Short notes on things that were not obvious. Prune stale ones.
|
||||||
|
|
||||||
|
- **`bin/cd-target` cannot be imported normally.** The hyphen in the filename is
|
||||||
|
not a valid Python identifier, so `bin/cd-render-hooks` loads it through
|
||||||
|
`importlib.machinery.SourceFileLoader`. Importing `importlib.util` alone is
|
||||||
|
not enough — `importlib.machinery` needs its own import.
|
||||||
|
|
||||||
|
- **`docker/metadata-action`'s `type=sha,format=short` produces 7 characters.**
|
||||||
|
That is why `image_tag_template` uses `{short7}`. domaindingo's `build.yml`
|
||||||
|
prefixes it with the branch, giving `test-sha-abc1234` / `prod-sha-abc1234`.
|
||||||
|
|
||||||
|
- **domaindingo's compose stacks are not in the domaindingo repo.** Test and
|
||||||
|
prod both live in `sysadmin/uas-ng` at
|
||||||
|
`docker/domaindingo/s5.fisher.hu/` (`docker-compose.yml` and
|
||||||
|
`docker-compose-prod.yml`). The `scripts/deploy-*.sh` files 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 != s2` guard in the old scripts therefore matched nothing and
|
||||||
|
`exit 0`d, which reads as success.
|
||||||
|
|
||||||
|
- **Registry tags in this fleet have drifted before.** `domaindingo:0.1.149`
|
||||||
|
once resolved to a different image than the one running, with a broken
|
||||||
|
`/login`. This is why `cd-deploy` checks
|
||||||
|
`org.opencontainers.image.revision` and deploys by digest.
|
||||||
|
|
||||||
|
- **`docker compose down -v` destroys the data volumes** for these stacks. The
|
||||||
|
retired paradicsomleves test script used it. `cd-deploy` only ever runs
|
||||||
|
`up -d`.
|
||||||
Reference in New Issue
Block a user