From c238ef84c41c41aead1cb775621cfd0028bc8c8e Mon Sep 17 00:00:00 2001 From: Peter Engelbert Date: Mon, 25 Nov 2024 11:17:42 -0500 Subject: [PATCH] Fix typo in target printing Signed-off-by: Peter Engelbert --- frontend/azlinux/azlinux3.go | 7 ++++++- frontend/azlinux/handler.go | 3 ++- frontend/azlinux/mariner2.go | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/azlinux/azlinux3.go b/frontend/azlinux/azlinux3.go index e550372f..3a065a14 100644 --- a/frontend/azlinux/azlinux3.go +++ b/frontend/azlinux/azlinux3.go @@ -18,7 +18,8 @@ const ( tdnfCacheNameAzlinux3 = "azlinux3-tdnf-cache" // Azlinux3Ref is the image ref used for the base worker image - Azlinux3Ref = "mcr.microsoft.com/azurelinux/base/core:3.0" + Azlinux3Ref = "mcr.microsoft.com/azurelinux/base/core:3.0" + AzLinux3FullName = "Azure Linux 3" // Azlinux3WorkerContextName is the build context name that can be used to lookup Azlinux3WorkerContextName = "dalec-azlinux3-worker" azlinux3DistrolessRef = "mcr.microsoft.com/azurelinux/distroless/base:3.0" @@ -73,3 +74,7 @@ func (azlinux3) DefaultImageConfig(ctx context.Context, resolver llb.ImageMetaRe func (azlinux3) tdnfCacheMount(root string) llb.RunOption { return llb.AddMount(filepath.Join(root, tdnfCacheDir), llb.Scratch(), llb.AsPersistentCacheDir(tdnfCacheNameAzlinux3, llb.CacheMountLocked)) } + +func (azlinux3) FullName() string { + return AzLinux3FullName +} diff --git a/frontend/azlinux/handler.go b/frontend/azlinux/handler.go index 490c0ac0..ff255ac5 100644 --- a/frontend/azlinux/handler.go +++ b/frontend/azlinux/handler.go @@ -25,6 +25,7 @@ type worker interface { Install(pkgs []string, opts ...installOpt) llb.RunOption DefaultImageConfig(context.Context, llb.ImageMetaResolver, *ocispecs.Platform) (*dalec.DockerImageSpec, error) BasePackages() []string + FullName() string } func newHandler(w worker) gwclient.BuildFunc { @@ -38,7 +39,7 @@ func newHandler(w worker) gwclient.BuildFunc { mux.Add("container", handleContainer(w), &targets.Target{ Name: "container", - Description: "Builds a container image for", + Description: "Builds a container image for " + w.FullName(), Default: true, }) diff --git a/frontend/azlinux/mariner2.go b/frontend/azlinux/mariner2.go index 9fe65161..e218effd 100644 --- a/frontend/azlinux/mariner2.go +++ b/frontend/azlinux/mariner2.go @@ -18,6 +18,7 @@ const ( tdnfCacheNameMariner2 = "mariner2-tdnf-cache" Mariner2Ref = "mcr.microsoft.com/cbl-mariner/base/core:2.0" + Mariner2FullName = "CBL-Mariner 2" Mariner2WorkerContextName = "dalec-mariner2-worker" mariner2DistrolessRef = "mcr.microsoft.com/cbl-mariner/distroless/base:2.0" ) @@ -71,6 +72,10 @@ func (mariner2) DefaultImageConfig(ctx context.Context, resolver llb.ImageMetaRe return &cfg, nil } +func (mariner2) FullName() string { + return Mariner2FullName +} + func (mariner2) tdnfCacheMount(root string) llb.RunOption { return llb.AddMount(filepath.Join(root, tdnfCacheDir), llb.Scratch(), llb.AsPersistentCacheDir(tdnfCacheNameMariner2, llb.CacheMountLocked)) }