build

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SupportedPlatformAPIVersions lists the Platform API versions pack supports.
	SupportedPlatformAPIVersions = []string{"0.2", "0.3"}
)

Functions

This section is empty.

Types

type Builder added in v0.10.0

type Builder interface {
	Name() string
	UID() int
	GID() int
	LifecycleDescriptor() builder.LifecycleDescriptor
}

type Cache

type Cache interface {
	Name() string
	Clear(context.Context) error
}

type DefaultPhaseFactory added in v0.10.0

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

func NewDefaultPhaseFactory added in v0.10.0

func NewDefaultPhaseFactory(lifecycle *Lifecycle) *DefaultPhaseFactory

func (*DefaultPhaseFactory) New added in v0.10.0

type Lifecycle

type Lifecycle struct {
	LayersVolume       string
	AppVolume          string
	Volumes            []string
	DefaultProcessType string
	// contains filtered or unexported fields
}

func NewLifecycle

func NewLifecycle(docker client.CommonAPIClient, logger logging.Logger) *Lifecycle

func (*Lifecycle) Analyze

func (l *Lifecycle) Analyze(ctx context.Context, repoName, cacheName string, publish, clearCache bool, phaseFactory PhaseFactory) error

func (*Lifecycle) Build

func (l *Lifecycle) Build(ctx context.Context, networkMode string, volumes []string, phaseFactory PhaseFactory) error

func (*Lifecycle) Cleanup

func (l *Lifecycle) Cleanup() error

func (*Lifecycle) Detect

func (l *Lifecycle) Detect(ctx context.Context, networkMode string, volumes []string, phaseFactory PhaseFactory) error

func (*Lifecycle) Execute

func (l *Lifecycle) Execute(ctx context.Context, opts LifecycleOptions) error

func (*Lifecycle) Export

func (l *Lifecycle) Export(ctx context.Context, repoName string, runImage string, publish bool, launchCacheName, cacheName string, phaseFactory PhaseFactory) error

func (*Lifecycle) Restore

func (l *Lifecycle) Restore(ctx context.Context, cacheName string, phaseFactory PhaseFactory) error

func (*Lifecycle) Setup

func (l *Lifecycle) Setup(opts LifecycleOptions)

type LifecycleOptions

type LifecycleOptions struct {
	AppPath            string
	Image              name.Reference
	Builder            Builder
	RunImage           string
	ClearCache         bool
	Publish            bool
	HTTPProxy          string
	HTTPSProxy         string
	NoProxy            string
	Network            string
	Volumes            []string
	DefaultProcessType string
	FileFilter         func(string) bool
}

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(ctx context.Context) error

type PhaseConfigProvider added in v0.10.0

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

func NewPhaseConfigProvider added in v0.10.0

func NewPhaseConfigProvider(name string, lifecycle *Lifecycle, ops ...PhaseConfigProviderOperation) *PhaseConfigProvider

func (*PhaseConfigProvider) ContainerConfig added in v0.10.0

func (p *PhaseConfigProvider) ContainerConfig() *container.Config

func (*PhaseConfigProvider) HostConfig added in v0.10.0

func (p *PhaseConfigProvider) HostConfig() *container.HostConfig

func (*PhaseConfigProvider) Name added in v0.10.0

func (p *PhaseConfigProvider) Name() string

type PhaseConfigProviderOperation added in v0.10.0

type PhaseConfigProviderOperation func(*PhaseConfigProvider)

func WithArgs

func WithArgs(args ...string) PhaseConfigProviderOperation

func WithBinds

func WithBinds(binds ...string) PhaseConfigProviderOperation

func WithDaemonAccess

func WithDaemonAccess() PhaseConfigProviderOperation

func WithLifecycleProxy added in v0.10.0

func WithLifecycleProxy(lifecycle *Lifecycle) PhaseConfigProviderOperation

func WithNetwork

func WithNetwork(networkMode string) PhaseConfigProviderOperation

func WithRegistryAccess

func WithRegistryAccess(authConfig string) PhaseConfigProviderOperation

type PhaseFactory added in v0.10.0

type PhaseFactory interface {
	New(provider *PhaseConfigProvider) RunnerCleaner
}

type RunnerCleaner added in v0.10.0

type RunnerCleaner interface {
	Run(ctx context.Context) error
	Cleanup() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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