fix: record the replaced images before the database step, for the whole project
CI / check (pull_request) Successful in 22s
CI / check (pull_request) Successful in 22s
The record was taken right before the engine's swap. Since then the database step and the broker replace their containers earlier, so a new PostgreSQL or Valkey image left the old one on the host for good; docker image prune -af used to take it. It also listed only the engine services, so postgres (behind its compose profile), apt-cacher-ng, signal-api and the retired registry were never recorded. deploy.sh now records the images of every container of the compose project netork, by its label, before the database step, and keeps only image IDs: they are expanded into the command that removes them. They are still removed only after the verification and the migration; a failed deploy removes nothing. remove_replaced_images.sh says nothing about an image still in use, which most of them now are on every deploy, and names only what it removed or could not remove.
This commit is contained in:
1 parent
31cc9da537
commit
abefafe070
6 files changed
+121
-44
No files matched your search
@@ -17,9 +17,9 @@ answered 500 on every request touching the changed table for eleven minutes.
|
||||
|
||||
So: tail and grep locally, on captured output, where `pipefail` and `set -e` can
|
||||
still act. The rule below is deliberately narrow — it covers only the steps whose
|
||||
failure must stop a deploy. `docker image prune | tail -1` is cosmetic and stays
|
||||
exempt, because a rule that forbids every pipe would be worked around rather than
|
||||
followed.
|
||||
failure must stop a deploy. Removing the images a deploy replaced is cosmetic and
|
||||
stays exempt, because a rule that forbids every pipe would be worked around rather
|
||||
than followed.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
Reference in new issue
Block a user