builder

package
v0.13.3-rc.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBuildContextEmpty = &Error{Code: "BuildContextEmpty", Message: "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 Builder

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

type BuilderOptions

type BuilderOptions struct {
	ImageName    string
	BuildContext string
	Args         []string
	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 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 struct {
	Code    string
	Message string
	Err     error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Wrap

func (e *Error) Wrap(err error) 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