diff --git a/cmd/werf/run/run.go b/cmd/werf/run/run.go index b6e673a382..1e10b15902 100644 --- a/cmd/werf/run/run.go +++ b/cmd/werf/run/run.go @@ -410,6 +410,7 @@ func run(ctx context.Context, containerBackend container_backend.ContainerBacken targetPlatforms = []string{containerBackend.GetDefaultPlatform()} } + // FIXME(multiarch): specify multiarch manifest here if err := c.FetchLastImageStage(ctx, targetPlatforms[0], imageName); err != nil { return err } diff --git a/cmd/werf/stage/image/main.go b/cmd/werf/stage/image/main.go index 077d0be2a5..90a3ce253d 100644 --- a/cmd/werf/stage/image/main.go +++ b/cmd/werf/stage/image/main.go @@ -207,8 +207,16 @@ func run(ctx context.Context, imageName string) error { return err } + targetPlatforms, err := c.GetTargetPlatforms() + if err != nil { + return fmt.Errorf("invalid target platforms: %w", err) + } + if len(targetPlatforms) == 0 { + targetPlatforms = []string{containerBackend.GetDefaultPlatform()} + } + // FIXME(multiarch): specify multiarch manifest here - fmt.Println(c.GetImageNameForLastImageStage("", imageName)) + fmt.Println(c.GetImageNameForLastImageStage(targetPlatforms[0], imageName)) return nil }); err != nil {