build

package
v17.12.0-ce-rc2+incomp... Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend provides build functionality to the API router

func NewBackend

func NewBackend(components ImageComponent, builder Builder, fsCache *fscache.FSCache) (*Backend, error)

NewBackend creates a new build backend from components

func (*Backend) Build

func (b *Backend) Build(ctx context.Context, config backend.BuildConfig) (string, error)

Build builds an image from a Source

func (*Backend) PruneCache

func (b *Backend) PruneCache(ctx context.Context) (*types.BuildCachePruneReport, error)

PruneCache removes all cached build sources

type Builder

type Builder interface {
	Build(context.Context, backend.BuildConfig) (*builder.Result, error)
}

Builder defines interface for running a build

type ImageComponent

type ImageComponent interface {
	SquashImage(from string, to string) (string, error)
	TagImageWithReference(image.ID, string, reference.Named) error
}

ImageComponent provides an interface for working with images

type Tagger

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

Tagger is responsible for tagging an image created by a builder

func NewTagger

func NewTagger(backend ImageComponent, stdout io.Writer, names []string) (*Tagger, error)

NewTagger returns a new Tagger for tagging the images of a build. If any of the names are invalid tags an error is returned.

func (*Tagger) TagImages

func (bt *Tagger) TagImages(imageID image.ID) error

TagImages creates image tags for the imageID

Jump to

Keyboard shortcuts

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