bake

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 34 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRemoteURL added in v0.5.0

func IsRemoteURL(url string) bool

func ParseHCLFile added in v0.6.0

func ParseHCLFile(dt []byte, fn string) (*hcl.File, bool, error)

func ReadRemoteFiles added in v0.5.0

func ReadRemoteFiles(ctx context.Context, dis []build.DriverInfo, url string, names []string, pw progress.Writer) ([]File, *Input, error)

func TargetsToBuildOpt

func TargetsToBuildOpt(m map[string]*Target, inp *Input) (map[string]build.Options, error)

Types

type Config

type Config struct {
	Groups  []*Group  `json:"group" hcl:"group,block"`
	Targets []*Target `json:"target" hcl:"target,block"`
}

func ParseCompose

func ParseCompose(dt []byte, envs map[string]string) (*Config, error)

func ParseComposeFile added in v0.6.0

func ParseComposeFile(dt []byte, fn string) (*Config, bool, error)

func ParseFile

func ParseFile(dt []byte, fn string) (*Config, error)

func ParseFiles added in v0.6.0

func ParseFiles(files []File, defaults map[string]string) (_ *Config, err error)

func (Config) ResolveGroup

func (c Config) ResolveGroup(name string) []string

func (Config) ResolveTarget

func (c Config) ResolveTarget(name string, overrides map[string]map[string]Override) (*Target, error)

type File added in v0.5.0

type File struct {
	Name string
	Data []byte
}

func ReadLocalFiles added in v0.5.0

func ReadLocalFiles(names []string) ([]File, error)

type Group

type Group struct {
	Name    string   `json:"-" hcl:"name,label"`
	Targets []string `json:"targets" hcl:"targets"`
}

func ReadTargets

func ReadTargets(ctx context.Context, files []File, targets, overrides []string, defaults map[string]string) (map[string]*Target, []*Group, error)

type Input added in v0.5.0

type Input struct {
	State *llb.State
	URL   string
}

type Override added in v0.7.0

type Override struct {
	Value    string
	ArrValue []string
}

type Target

type Target struct {
	Name string `json:"-" hcl:"name,label"`

	// Inherits is the only field that cannot be overridden with --set
	Inherits []string `json:"inherits,omitempty" hcl:"inherits,optional"`

	Context          *string           `json:"context,omitempty" hcl:"context,optional"`
	Contexts         map[string]string `json:"contexts,omitempty" hcl:"contexts,optional"`
	Dockerfile       *string           `json:"dockerfile,omitempty" hcl:"dockerfile,optional"`
	DockerfileInline *string           `json:"dockerfile-inline,omitempty" hcl:"dockerfile-inline,optional"`
	Args             map[string]string `json:"args,omitempty" hcl:"args,optional"`
	Labels           map[string]string `json:"labels,omitempty" hcl:"labels,optional"`
	Tags             []string          `json:"tags,omitempty" hcl:"tags,optional"`
	CacheFrom        []string          `json:"cache-from,omitempty"  hcl:"cache-from,optional"`
	CacheTo          []string          `json:"cache-to,omitempty"  hcl:"cache-to,optional"`
	Target           *string           `json:"target,omitempty" hcl:"target,optional"`
	Secrets          []string          `json:"secret,omitempty" hcl:"secret,optional"`
	SSH              []string          `json:"ssh,omitempty" hcl:"ssh,optional"`
	Platforms        []string          `json:"platforms,omitempty" hcl:"platforms,optional"`
	Outputs          []string          `json:"output,omitempty" hcl:"output,optional"`
	Pull             *bool             `json:"pull,omitempty" hcl:"pull,optional"`
	NoCache          *bool             `json:"no-cache,omitempty" hcl:"no-cache,optional"`
	NetworkMode      *string           `json:"-" hcl:"-"`
	NoCacheFilter    []string          `json:"no-cache-filter,omitempty" hcl:"no-cache-filter,optional"`
	// contains filtered or unexported fields
}

func (*Target) AddOverrides added in v0.7.0

func (t *Target) AddOverrides(overrides map[string]Override) error

func (*Target) Merge added in v0.6.0

func (t *Target) Merge(t2 *Target)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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