buildkit

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package buildkit implements a compiler for turning Blubber configuration into a valid llb.State graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, c client.Client) (*client.Result, error)

Build handles BuildKit client requests for the Blubber gateway.

When performing a multi-platform build, the final exported manifest will be an OCI image index (aka "fat" manifest) and multiple sub manifests will be created for each platform that contain the actual image layers.

See https://github.com/opencontainers/image-spec/blob/main/image-index.md

For a single platform build, the export will be a normal single manifest with image layers.

See https://github.com/opencontainers/image-spec/blob/main/manifest.md

func Compile

func Compile(cfg *config.Config, variant string) (*bytes.Buffer, error)

Compile takes a parsed config.Config and a configured variant name and returns an llb.State graph as JSON.

func CompileToLLB

func CompileToLLB(
	ctx context.Context,
	ebo *ExtraBuildOptions,
	cfg *config.Config,
	variant string,
	convertOpts d2llb.ConvertOpt,
) (*llb.State, *d2llb.Image, error)

CompileToLLB takes a parsed config.Config and a configured variant name and returns an llb.State graph.

Types

type ExtraBuildOptions

type ExtraBuildOptions struct {
	// contains filtered or unexported fields
}

ExtraBuildOptions stores options to configure the build process. These are not BuildKit options, but additional configuration implemented by this Blubber BuildKit frontend

func ParseExtraOptions

func ParseExtraOptions(ops map[string]string) (*ExtraBuildOptions, error)

ParseExtraOptions parses and returns a newly created ExtraBuildOption

func (*ExtraBuildOptions) EntrypointArgs

func (ebo *ExtraBuildOptions) EntrypointArgs() []string

EntrypointArgs returns ebo.entrypointArgs

func (*ExtraBuildOptions) RunEntrypoint

func (ebo *ExtraBuildOptions) RunEntrypoint() bool

RunEntrypoint returns ebo.runEntrypoint

func (*ExtraBuildOptions) RunVariantEnvironment added in v0.17.0

func (ebo *ExtraBuildOptions) RunVariantEnvironment() map[string]string

RunVariantEnvironment returns ebo.runVariantEnvironment

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL