build

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2018 License: Apache-2.0 Imports: 28 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

func GetDependenciesForArtifact added in v0.4.0

func GetDependenciesForArtifact(artifact *v1alpha2.Artifact) ([]string, error)

Types

type Build

type Build struct {
	ImageName string
	Tag       string
	Artifact  *v1alpha2.Artifact // The artifact used in the build.
}

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 {
	Build(ctx context.Context, out io.Writer, tagger tag.Tagger, artifacts []*v1alpha2.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 DependencyMap added in v0.4.0

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

func NewDependencyMap added in v0.4.0

func NewDependencyMap(artifacts []*v1alpha2.Artifact) (*DependencyMap, error)

func (*DependencyMap) ArtifactsForPaths added in v0.4.0

func (d *DependencyMap) ArtifactsForPaths(paths []string) []*v1alpha2.Artifact

func (*DependencyMap) Paths added in v0.4.0

func (d *DependencyMap) Paths() []string

type DependencyResolver added in v0.4.0

type DependencyResolver interface {
	GetDependencies(a *v1alpha2.Artifact) ([]string, error)
}
var (
	DefaultDockerfileDepResolver DependencyResolver = &docker.DockerfileDepResolver{}
	DefaultBazelDepResolver      DependencyResolver = &bazel.BazelDependencyResolver{}
)

type GoogleCloudBuilder

type GoogleCloudBuilder struct {
	*v1alpha2.BuildConfig
}

func NewGoogleCloudBuilder

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

func (*GoogleCloudBuilder) Build added in v0.3.0

func (cb *GoogleCloudBuilder) Build(ctx context.Context, out io.Writer, tagger tag.Tagger, artifacts []*v1alpha2.Artifact) (*BuildResult, error)

type KanikoBuilder added in v0.5.0

type KanikoBuilder struct {
	*v1alpha2.BuildConfig
}

func NewKanikoBuilder added in v0.5.0

func NewKanikoBuilder(cfg *v1alpha2.BuildConfig) (*KanikoBuilder, error)

func (*KanikoBuilder) Build added in v0.5.0

func (k *KanikoBuilder) Build(ctx context.Context, out io.Writer, tagger tag.Tagger, artifacts []*v1alpha2.Artifact) (*BuildResult, error)

type LocalBuilder

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

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

func NewLocalBuilder

func NewLocalBuilder(cfg *v1alpha2.BuildConfig, kubeContext string) (*LocalBuilder, error)

NewLocalBuilder returns an new instance of a LocalBuilder

func (*LocalBuilder) Build added in v0.3.0

func (l *LocalBuilder) Build(ctx context.Context, out io.Writer, tagger tag.Tagger, artifacts []*v1alpha2.Artifact) (*BuildResult, error)

Build 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