build

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithArgs

func WithArgs(args ...string) func(*Phase) (*Phase, error)

func WithDaemonAccess

func WithDaemonAccess() func(*Phase) (*Phase, error)

func WithRegistryAccess

func WithRegistryAccess(repos ...string) func(*Phase) (*Phase, error)

Types

type Docker

type Docker interface {
	RunContainer(ctx context.Context, id string, stdout io.Writer, stderr io.Writer) error
	CopyToContainer(ctx context.Context, containerID, dstPath string, content io.Reader, options types.CopyToContainerOptions) error
	ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
	ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
	ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)
	ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
	VolumeRemove(ctx context.Context, volumeID string, force bool) error
	VolumeList(ctx context.Context, filter filters.Args) (volume.VolumeListOKBody, error)
}

type Lifecycle

type Lifecycle struct {
	BuilderImage string
	Logger       *logging.Logger
	Docker       Docker
	LayersVolume string
	AppVolume    string
	// contains filtered or unexported fields
}

func NewLifecycle

func NewLifecycle(c LifecycleConfig) (*Lifecycle, error)

func (*Lifecycle) Cleanup

func (l *Lifecycle) Cleanup() error

func (*Lifecycle) NewAnalyze

func (l *Lifecycle) NewAnalyze(repoName string, publish bool) (*Phase, error)

func (*Lifecycle) NewBuild

func (l *Lifecycle) NewBuild() (*Phase, error)

func (*Lifecycle) NewCache

func (l *Lifecycle) NewCache(cacheImage string) (*Phase, error)

func (*Lifecycle) NewDetect

func (l *Lifecycle) NewDetect() (*Phase, error)

func (*Lifecycle) NewExport

func (l *Lifecycle) NewExport(repoName, runImage string, publish bool) (*Phase, error)

func (*Lifecycle) NewPhase

func (l *Lifecycle) NewPhase(name string, ops ...func(*Phase) (*Phase, error)) (*Phase, error)

func (*Lifecycle) NewRestore

func (l *Lifecycle) NewRestore(cacheImage string) (*Phase, error)

type LifecycleConfig

type LifecycleConfig struct {
	BuilderImage string
	Logger       *logging.Logger
	Env          map[string]string
	Buildpacks   []string
	AppDir       string
}

type Phase

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

func (*Phase) Cleanup

func (p *Phase) Cleanup() error

func (*Phase) Run

func (p *Phase) Run(context context.Context) error

Jump to

Keyboard shortcuts

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