buildkit

package
v0.0.107 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultContainerName = "fn-buildkitd"
View Source
const SSHAgentProviderID = "default"

Variables

View Source
var (
	BuildkitSecrets string
	ForwardKeychain = false
)
View Source
var (
	ImportCacheVar = &cacheVar{}
	ExportCacheVar = &cacheVar{}
)
View Source
var File_internal_build_buildkit_devhost_proto protoreflect.FileDescriptor
View Source
var OverridesConfigType = cfg.DefineConfigType[*Overrides]()
View Source
var PreDigestLocalInputs = environment.IsRunningInCI()

XXX make this a flag instead. The assumption here is that in CI the filesystem is readonly.

View Source
var SkipExpectedMaxWorkspaceSizeCheck = false
View Source
var TaskOutputBuildkitJsonLog = tasks.Output("buildkit.json", "application/json+fn.buildkit")
View Source
var UsePlaintextLogging = false

Functions

func BuildDefinitionToImage

func BuildDefinitionToImage(env cfg.Context, conf build.BuildTarget, def *llb.Definition) compute.Computable[oci.Image]

func BuildFilesystem

func BuildFilesystem(ctx context.Context, conf cfg.Configuration, target build.BuildTarget, state llb.State, localDirs ...LocalContents) (compute.Computable[fs.FS], error)

func BuildImage

func BuildImage(ctx context.Context, env cfg.Context, conf build.BuildTarget, state llb.State, localDirs ...LocalContents) (compute.Computable[oci.Image], error)

func EnsureBuildkitd

func EnsureBuildkitd(ctx context.Context, containerName string) (string, error)

func HostPlatform

func HostPlatform() specs.Platform

func MakeImage added in v0.0.83

func MakeLocalExcludes

func MakeLocalExcludes(src LocalContents) []string

func MakeLocalState

func MakeLocalState(src LocalContents) llb.State

func Prune

func Prune(ctx context.Context, cfg cfg.Configuration, targetPlatform specs.Platform) error

func RemoveBuildkitd

func RemoveBuildkitd(ctx context.Context) error

func Version

func Version() (string, error)

Types

type BuildkitAwareRegistry

type BuildkitAwareRegistry interface {
	CheckExportRequest(*GatewayClient, oci.AllocatedRepository) (*ExportToRegistryRequest, *ExportToRegistryRequest)
}

type ExportToRegistryRequest

type ExportToRegistryRequest struct {
	Name     string
	Insecure bool
}

type FrontendRequest added in v0.0.83

type FrontendRequest struct {
	Def            *llb.Definition
	OriginalState  *llb.State
	Frontend       string
	FrontendOpt    map[string]string
	FrontendInputs map[string]llb.State
}

type GatewayClient

type GatewayClient struct {
	*client.Client
	// contains filtered or unexported fields
}

func (*GatewayClient) UsesDocker

func (cli *GatewayClient) UsesDocker() bool

type HostedBuildCluster added in v0.0.92

type HostedBuildCluster struct {
	ClusterId  string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	TargetPort int32  `protobuf:"varint,2,opt,name=target_port,json=targetPort,proto3" json:"target_port,omitempty"`
	// contains filtered or unexported fields
}

func (*HostedBuildCluster) Descriptor deprecated added in v0.0.92

func (*HostedBuildCluster) Descriptor() ([]byte, []int)

Deprecated: Use HostedBuildCluster.ProtoReflect.Descriptor instead.

func (*HostedBuildCluster) GetClusterId added in v0.0.92

func (x *HostedBuildCluster) GetClusterId() string

func (*HostedBuildCluster) GetTargetPort added in v0.0.92

func (x *HostedBuildCluster) GetTargetPort() int32

func (*HostedBuildCluster) ProtoMessage added in v0.0.92

func (*HostedBuildCluster) ProtoMessage()

func (*HostedBuildCluster) ProtoReflect added in v0.0.92

func (x *HostedBuildCluster) ProtoReflect() protoreflect.Message

func (*HostedBuildCluster) Reset added in v0.0.92

func (x *HostedBuildCluster) Reset()

func (*HostedBuildCluster) String added in v0.0.92

func (x *HostedBuildCluster) String() string

type LocalContents

type LocalContents struct {
	Module         build.Workspace
	Path           string
	ObserveChanges bool
	// For Web we apply special handling temporarily: not including the root tsconfig.json as it belongs to Node.js
	TemporaryIsWeb bool

	// If set, only files matching these patterns will be included in the state.
	IncludePatterns []string
	// Added to the base exclude patterns. Override include patterns: if a file matches both, it is not included.
	ExcludePatterns []string
}

func (LocalContents) Abs

func (l LocalContents) Abs() string

type Overrides

type Overrides struct {
	ContainerName      string              `protobuf:"bytes,1,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"`
	BuildkitAddr       string              `protobuf:"bytes,2,opt,name=buildkit_addr,json=buildkitAddr,proto3" json:"buildkit_addr,omitempty"`
	HostedBuildCluster *HostedBuildCluster `protobuf:"bytes,3,opt,name=hosted_build_cluster,json=hostedBuildCluster,proto3" json:"hosted_build_cluster,omitempty"`
	// contains filtered or unexported fields
}

Used for configuration purposes.

func (*Overrides) Descriptor deprecated

func (*Overrides) Descriptor() ([]byte, []int)

Deprecated: Use Overrides.ProtoReflect.Descriptor instead.

func (*Overrides) GetBuildkitAddr

func (x *Overrides) GetBuildkitAddr() string

func (*Overrides) GetContainerName

func (x *Overrides) GetContainerName() string

func (*Overrides) GetHostedBuildCluster added in v0.0.92

func (x *Overrides) GetHostedBuildCluster() *HostedBuildCluster

func (*Overrides) ProtoMessage

func (*Overrides) ProtoMessage()

func (*Overrides) ProtoReflect

func (x *Overrides) ProtoReflect() protoreflect.Message

func (*Overrides) Reset

func (x *Overrides) Reset()

func (*Overrides) String

func (x *Overrides) String() string

Jump to

Keyboard shortcuts

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