Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in target printing #443

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion frontend/azlinux/azlinux3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion frontend/azlinux/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
})

Expand Down
5 changes: 5 additions & 0 deletions frontend/azlinux/mariner2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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))
}