pack

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBuilder = "heroku/buildpacks:18"

Variables

View Source
var File_waypoint_builtin_pack_plugin_proto protoreflect.FileDescriptor
View Source
var Options = []sdk.Option{
	sdk.WithComponents(&Builder{}),
	sdk.WithMappers(PackImageMapper),
}

Options are the SDK options to use for instantiation.

Functions

func PackImageMapper

func PackImageMapper(src *DockerImage) *docker.Image

PackImageMapper maps a pack.DockerImage to our Image structure.

NOTE(mitchellh): the pack builder can probably just reuse the image from here but at the time of writing I was still building all the mapper subsystems so I wanted to test it out.

Types

type Builder

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

Builder uses `pack` -- the frontend for CloudNative Buildpacks -- to build an artifact from source.

func (*Builder) Build

func (b *Builder) Build(
	ctx context.Context,
	ui terminal.UI,
	jobInfo *component.JobInfo,
	src *component.Source,
) (*DockerImage, error)

Build

func (*Builder) BuildFunc

func (b *Builder) BuildFunc() interface{}

BuildFunc implements component.Builder

func (*Builder) Config

func (b *Builder) Config() (interface{}, error)

Config implements Configurable

func (*Builder) Documentation

func (b *Builder) Documentation() (*docs.Documentation, error)

type BuilderConfig

type BuilderConfig struct {
	// Control whether or not to inject the entrypoint binary into the resulting image
	DisableCEB bool `hcl:"disable_entrypoint,optional"`

	// The Buildpack builder image to use, defaults to the standard heroku one.
	Builder string `hcl:"builder,optional"`

	// Environment variables that are meant to configure the application in a static
	// way. This might be control an image that has mulitple modes of operation,
	// selected via environment variable. Most configuration should use the waypoint
	// config commands.
	StaticEnvVars map[string]string `hcl:"static_environment,optional"`
}

Config is the configuration structure for the registry.

type DockerImage

type DockerImage struct {
	Image       string            `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	Tag         string            `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
	BuildLabels map[string]string `` /* 182-byte string literal not displayed */
	// contains filtered or unexported fields
}

DockerImage is the artifact type for the builder.

func (*DockerImage) Descriptor deprecated

func (*DockerImage) Descriptor() ([]byte, []int)

Deprecated: Use DockerImage.ProtoReflect.Descriptor instead.

func (*DockerImage) GetBuildLabels

func (x *DockerImage) GetBuildLabels() map[string]string

func (*DockerImage) GetImage

func (x *DockerImage) GetImage() string

func (*DockerImage) GetTag

func (x *DockerImage) GetTag() string

func (*DockerImage) Labels

func (i *DockerImage) Labels() map[string]string

func (*DockerImage) ProtoMessage

func (*DockerImage) ProtoMessage()

func (*DockerImage) ProtoReflect

func (x *DockerImage) ProtoReflect() protoreflect.Message

func (*DockerImage) Reset

func (x *DockerImage) Reset()

func (*DockerImage) String

func (x *DockerImage) String() string

Jump to

Keyboard shortcuts

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