Matrix over both images. molecule-ubuntu2404 keeps its sub-path context;
ci uses the repository root as context (its Dockerfile copies the pin
files) and also rebuilds when requirements-dev.txt or
.pre-commit-config.yaml change.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Lint and Build install OS packages, the pinned Python tools and every
pre-commit hook environment on each run (about 40s of the 50 to 86s). Bake
them into git.rkdr.net/mortis/ci instead:
- images/ci/Dockerfile, multi-stage: the build stage creates the venv from
requirements-dev.txt, installs Python 3.11 and 3.13 (uv, for the ansible-test
compile check that is skipped today) and runs `pre-commit install-hooks`
from .pre-commit-config.yaml; the final stage copies only the results.
Several layers, each meant to stay below Cloudflare's 100 MB request limit.
- The image records the sha256 of the two pin files it was built from
(/opt/ci-pins.sha256) so a job can detect drift and fall back to
installing at run time.
- image.yml builds both images in a matrix (molecule-ubuntu2404 unchanged,
ci with the repository root as build context) and also runs when the pin
files change.
Nothing consumes the image yet: the workflows switch to its digest in a
follow-up once the first build has shown the real layer sizes.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm