build

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 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.1", "0.2"}
)

Functions

func WithArgs

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

func WithBinds

func WithBinds(binds ...string) func(*Phase) (*Phase, error)

func WithDaemonAccess

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

func WithNetwork

func WithNetwork(networkMode string) func(*Phase) (*Phase, error)

func WithRegistryAccess

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

func WithRoot

func WithRoot() func(*Phase) (*Phase, error)

Types

type Cache

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

type Lifecycle

type Lifecycle struct {
	LayersVolume string
	AppVolume    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) error

func (*Lifecycle) Build

func (l *Lifecycle) Build(ctx context.Context, networkMode string) error

func (*Lifecycle) Cache

func (l *Lifecycle) Cache(ctx context.Context, cacheName string) error

The cache phase is obsolete with Platform API 0.2 and will be removed in the future.

func (*Lifecycle) Cleanup

func (l *Lifecycle) Cleanup() error

func (*Lifecycle) CombinedExporterCacher

func (l *Lifecycle) CombinedExporterCacher() bool

CombinedExporterCacher returns true if the lifecycle contains combined exporter/cacher phases and reversed analyzer/restorer phases.

func (*Lifecycle) Detect

func (l *Lifecycle) Detect(ctx context.Context, networkMode string) 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) error

func (*Lifecycle) NewPhase

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

func (*Lifecycle) Restore

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

func (*Lifecycle) Setup

func (l *Lifecycle) Setup(opts LifecycleOptions)

type LifecycleOptions

type LifecycleOptions struct {
	AppPath    string
	Image      name.Reference
	Builder    *builder.Builder
	RunImage   string
	ClearCache bool
	Publish    bool
	HTTPProxy  string
	HTTPSProxy string
	NoProxy    string
	Network    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(ctx context.Context) error

Jump to

Keyboard shortcuts

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