An artifact may name which stage of its recipe to stop at

One source, two images, deliberately different: a toolchain carries a compiler
and the image the same module runs in should not.
This commit is contained in:
2026-09-14 01:57:07 +02:00
parent cfe2816495
commit 811b805c67
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -239,6 +239,9 @@ func one(ctx context.Context, run Runner, publish Publisher,
// The bases this module named, resolved to what this mesh holds. A recipe reads them as
// build arguments, so a module says which module it stands on and never which copy.
invocation := append([]string{"build", "-f", a.From, "-t", local}, args...)
if a.Target != "" {
invocation = append(invocation, "--target", a.Target)
}
invocation = append(invocation, ".")
if _, err := run(ctx, tree, "docker", invocation...); err != nil {
return catalogue.Built{}, fmt.Errorf("%s: building %s failed: %w", module, a.Name, err)