builder

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBuildContextEmpty = errors.New("BuildContextEmpty", "build context cannot be empty")
)

Functions

func DefaultImageName

func DefaultImageName(buildContext string) (string, error)

func GetDirFromBuildContext

func GetDirFromBuildContext(ctx string) string

func IsDirContext

func IsDirContext(ctx string) bool

func IsGitContext

func IsGitContext(ctx string) bool

Types

type ArgInterface added in v0.16.2

type ArgInterface interface {
	GetKey() string
	GetValue() string
}

type BuildArg added in v0.16.2

type BuildArg struct {
	Value string
}

BuildArg is a build argument that can be passed to the builder.

func (*BuildArg) GetKey added in v0.16.2

func (b *BuildArg) GetKey() string

func (*BuildArg) GetValue added in v0.16.2

func (b *BuildArg) GetValue() string

type Builder

type Builder interface {
	Build(ctx context.Context, b *BuilderOptions) (logs string, err error)
}

type BuilderOptions

type BuilderOptions struct {
	ImageName    string
	BuildContext string
	Args         []ArgInterface
	Destination  string
	Cache        *CacheOptions
}

type CacheOptions

type CacheOptions struct {
	Enabled bool
	Dir     string
	Repo    string
}

func (*CacheOptions) Default

func (c *CacheOptions) Default(buildContext string) (*CacheOptions, error)

type CustomArg added in v0.16.2

type CustomArg struct {
	Key   string
	Value string
}

CustomArg is a custom argument that can be passed to the builder.

func (*CustomArg) GetKey added in v0.16.2

func (c *CustomArg) GetKey() string

func (*CustomArg) GetValue added in v0.16.2

func (c *CustomArg) GetValue() string

type DirContext

type DirContext struct {
	Path string // This path must be an absolute path
}

func (DirContext) BuildContext

func (d DirContext) BuildContext() string

type Error

type Error = errors.Error

type GitContext

type GitContext struct {
	Repo     string
	Branch   string
	Commit   string
	Username string
	Password string
}

func (*GitContext) BuildContext

func (g *GitContext) BuildContext() (string, error)

This build context follows Kaniko build context pattern ref: https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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