buildpacks

package
v2.11.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Name = "Buildpacks"

Name is the name of the Buildpack builder

View Source
var (
	Validate = validate
)

For testing

Functions

func GetDependencies

func GetDependencies(ctx context.Context, workspace string, a *latest.BuildpackArtifact) ([]string, error)

GetDependencies returns dependencies listed for a buildpack artifact

func GetEnv

func GetEnv(a *latest.Artifact, mode config.RunMode) (map[string]string, error)

func NewLogger

func NewLogger(out io.Writer) logging.Logger

func SyncRules

func SyncRules(labels map[string]string) ([]*latest.SyncRule, error)

$ docker inspect demo/buildpacks | jq -r '.[].Config.Labels["io.buildpacks.build.metadata"] | fromjson.bom[].metadata["devmode.sync"]'

Types

type ArtifactConfig

type ArtifactConfig struct {
	File    string `json:"path,omitempty"`
	Builder string `json:"builder,omitempty"`
}

ArtifactConfig holds information about a Buildpack project

func (ArtifactConfig) ArtifactType

func (c ArtifactConfig) ArtifactType(_ string) latest.ArtifactType

ArtifactType returns the type of the artifact to be built.

func (ArtifactConfig) ConfiguredImage

func (c ArtifactConfig) ConfiguredImage() string

ConfiguredImage returns the target image configured by the builder, or empty string if no image is configured

func (ArtifactConfig) Describe

func (c ArtifactConfig) Describe() string

Describe returns the initBuilder's string representation, used when prompting the user to choose a builder.

func (ArtifactConfig) Name

func (c ArtifactConfig) Name() string

Name returns the name of the builder

func (ArtifactConfig) Path

func (c ArtifactConfig) Path() string

Path returns the path to the build definition

type ArtifactResolver

type ArtifactResolver interface {
	GetImageTag(imageName string) (string, bool)
}

ArtifactResolver provides an interface to resolve built artifact tags by image name.

type Builder

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

Builder is an artifact builder that uses buildpacks

func NewArtifactBuilder

func NewArtifactBuilder(localDocker docker.LocalDaemon, pushImages bool, mode config.RunMode, r ArtifactResolver) *Builder

NewArtifactBuilder returns a new buildpack artifact builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, out io.Writer, artifact *latest.Artifact, tag string, matcher platform.Matcher) (string, error)

Build builds an artifact with Cloud Native Buildpacks: https://buildpacks.io/

func (*Builder) SupportedPlatforms

func (b *Builder) SupportedPlatforms() platform.Matcher

Jump to

Keyboard shortcuts

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