Expand description
Bake artifact discovery — single source of truth for “which
docker-bake.hcl files compose the fleet’s build graph.” Used by
src/build.rs (the CLI), tests/common/mod.rs (test bootstraps),
and tests/build/test.rs (the principle-15 lint). Per RULES.md
principle 11 (Reuse over repetition): one home for the category
list, the seed file, and the walker.
Constants§
- ARTIFACT_
CATEGORIES - The five artifact categories whose subdirectories ship Dockerfiles
and
docker-bake.hclfiles per RULES.md principle 15. Adding a sixth category is the only place this constant changes. - COMBINATION_
BAKE_ FILE - Path to the parameterized eval combination template.
- ROOT_
BAKE_ FILE - Path to the root bake file. Declares fleet-wide variables (
REGISTRY) that per-artifact files reference via${REGISTRY}/...without redeclaring (principle 11 — reuse over repetition).
Functions§
- artifact_
bake_ files - Every
docker-bake.hclin the fleet, plus the root and combination seeds. Order doesn’t matter — bake merges by target name. - artifact_
dirs_ with_ dockerfile - Every artifact directory (a subdirectory of one of the five
categories) that contains a
Dockerfile. Sorted for stable test failure output. - base_
args - Construct the
docker buildx bakeargument list for the given targets and--setoverrides. Bake files come fromartifact_bake_files. With nobuilder,--loadis appended so the result lands in the local image store; with a namedbuilder(a remote/in-cluster BuildKit),--builder <name> --pushis appended instead, since a remote builder can’t load into local Docker.