build

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 27 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
	Stack() builder.StackMetadata
}

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, networkMode 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) Create added in v0.11.0

func (l *Lifecycle) Create(
	ctx context.Context,
	publish, clearCache bool,
	runImage, launchCacheName, cacheName, repoName, networkMode string,
	volumes []string,
	phaseFactory PhaseFactory) 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, networkMode string, phaseFactory PhaseFactory) error

func (*Lifecycle) Restore

func (l *Lifecycle) Restore(ctx context.Context, cacheName, networkMode 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
	LifecycleImage     string
	RunImage           string
	ClearCache         bool
	Publish            bool
	TrustBuilder       bool
	UseCreator         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) ErrorWriter added in v0.11.0

func (p *PhaseConfigProvider) ErrorWriter() io.Writer

func (*PhaseConfigProvider) HostConfig added in v0.10.0

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

func (*PhaseConfigProvider) InfoWriter added in v0.11.0

func (p *PhaseConfigProvider) InfoWriter() io.Writer

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 WithEnv added in v0.11.0

func WithEnv(envs ...string) PhaseConfigProviderOperation

func WithImage added in v0.11.0

func WithImage(image string) PhaseConfigProviderOperation

func WithLifecycleProxy added in v0.10.0

func WithLifecycleProxy(lifecycle *Lifecycle) PhaseConfigProviderOperation

func WithLogPrefix added in v0.11.0

func WithLogPrefix(prefix string) PhaseConfigProviderOperation

WithLogPrefix sets a prefix for logs produced by this phase

func WithMounts added in v0.11.0

func WithMounts(mounts ...mount.Mount) 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