buildpacks

package
v0.41.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultName = builders.Pack

DefaultName when no WithName option is provided to NewBuilder

Variables

View Source
var DefaultBaseBuilder = "ghcr.io/knative/builder-jammy-base:0.4.283"
View Source
var (
	DefaultBuilderImages = map[string]string{
		"node":       DefaultBaseBuilder,
		"nodejs":     DefaultBaseBuilder,
		"typescript": DefaultBaseBuilder,
		"go":         DefaultTinyBuilder,
		"python":     DefaultBaseBuilder,
		"quarkus":    DefaultTinyBuilder,
		"rust":       DefaultBaseBuilder,
		"springboot": DefaultBaseBuilder,
	}
)
View Source
var DefaultLifecycleImage = "docker.io/buildpacksio/lifecycle:553c041"
View Source
var DefaultTinyBuilder = "ghcr.io/knative/builder-jammy-tiny:0.0.240"

Functions

func BuilderImage

func BuilderImage(f fn.Function, builderName string) (string, error)

Builder Image chooses the correct builder image or defaults.

func TrustBuilder

func TrustBuilder(b string) bool

TrustBuilder determines whether the builder image should be trusted based on a set of trusted builder image registry prefixes.

Types

type Builder

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

Builder will build Function using Pack.

func NewBuilder

func NewBuilder(options ...Option) *Builder

NewBuilder instantiates a Buildpack-based Builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platform) (err error)

Build the Function at path.

type ErrRuntimeNotSupported

type ErrRuntimeNotSupported struct {
	Runtime string
}

func (ErrRuntimeNotSupported) Error

func (e ErrRuntimeNotSupported) Error() string

type ErrRuntimeRequired

type ErrRuntimeRequired struct{}

func (ErrRuntimeRequired) Error

func (e ErrRuntimeRequired) Error() string

type Impl

type Impl interface {
	Build(context.Context, pack.BuildOptions) error
}

Impl allows for the underlying implementation to be mocked for tests.

type Option

type Option func(*Builder)

func WithImpl

func WithImpl(i Impl) Option

func WithName

func WithName(n string) Option

func WithTimestamp added in v0.38.0

func WithTimestamp(v bool) Option

func WithVerbose

func WithVerbose(v bool) Option

Jump to

Keyboard shortcuts

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