build

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: Apache-2.0 Imports: 20 Imported by: 18

Documentation

Index

Constants

View Source
const (
	// StatusUnknown "STATUS_UNKNOWN" - Status of the build is unknown.
	StatusUnknown = "STATUS_UNKNOWN"

	// StatusQueued "QUEUED" - Build is queued; work has not yet begun.
	StatusQueued = "QUEUED"

	// StatusWorking "WORKING" - Build is being executed.
	StatusWorking = "WORKING"

	// StatusSuccess  "SUCCESS" - Build finished successfully.
	StatusSuccess = "SUCCESS"

	// StatusFailure  "FAILURE" - Build failed to complete successfully.
	StatusFailure = "FAILURE"

	// StatusInternalError  "INTERNAL_ERROR" - Build failed due to an internal cause.
	StatusInternalError = "INTERNAL_ERROR"

	// StatusTimeout  "TIMEOUT" - Build took longer than was allowed.
	StatusTimeout = "TIMEOUT"

	// StatusCancelled  "CANCELLED" - Build was canceled by a user.
	StatusCancelled = "CANCELLED"

	// RetryDelay is the time to wait in between polling the status of the cloud build
	RetryDelay = 1 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	ImageName string
	Tag       string
}

Build is the result corresponding to each Artifact built.

type BuildResult

type BuildResult struct {
	Builds []Build
}

BuildResult holds the results of builds

type Builder

type Builder interface {
	Run(out io.Writer, tagger tag.Tagger, artifacts []*config.Artifact) (*BuildResult, error)
}

Builder is an interface to the Build API of Skaffold. It must build and make the resulting image accesible to the cluster. This could include pushing to a authorized repository or loading the nodes with the image. If artifacts is supplied, the builder should only rebuild those artifacts.

type GoogleCloudBuilder

type GoogleCloudBuilder struct {
	*config.BuildConfig
}

func NewGoogleCloudBuilder

func NewGoogleCloudBuilder(cfg *config.BuildConfig) (*GoogleCloudBuilder, error)

func (*GoogleCloudBuilder) Run

func (cb *GoogleCloudBuilder) Run(out io.Writer, tagger tag.Tagger, artifacts []*config.Artifact) (*BuildResult, error)

type LocalBuilder

type LocalBuilder struct {
	*config.BuildConfig
	// contains filtered or unexported fields
}

LocalBuilder uses the host docker daemon to build and tag the image

func NewLocalBuilder

func NewLocalBuilder(cfg *config.BuildConfig) (*LocalBuilder, error)

NewLocalBuilder returns an new instance of a LocalBuilder

func (*LocalBuilder) Run

func (l *LocalBuilder) Run(out io.Writer, tagger tag.Tagger, artifacts []*config.Artifact) (*BuildResult, error)

Run runs a docker build on the host and tags the resulting image with its checksum. It streams build progress to the writer argument.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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