build

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

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

View Source
var DependenciesForArtifact = dependenciesForArtifact

DependenciesForArtifact is used in tests.

Functions

This section is empty.

Types

type Artifact added in v0.8.0

type Artifact struct {
	ImageName string
	Tag       string
}

Artifact is the result corresponding to each successful build.

type Builder

type Builder interface {
	Labels() map[string]string

	Build(ctx context.Context, out io.Writer, tagger tag.Tagger, artifacts []*v1alpha2.Artifact) ([]Artifact, 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
}

DependencyMap is a bijection between artifacts and the files they depend on.

func NewDependencyMap added in v0.4.0

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

func NewExplicitDependencyMap added in v0.6.1

func NewExplicitDependencyMap(artifacts []*v1alpha2.Artifact, pathToArtifacts map[string][]*v1alpha2.Artifact) *DependencyMap

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 DependencyMapFactory added in v0.6.1

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

DependencyMapFactory can build DependencyMaps from a list of artifacts.

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) ([]Artifact, error)

func (*GoogleCloudBuilder) Labels added in v0.8.0

func (cb *GoogleCloudBuilder) Labels() map[string]string

type KanikoBuilder added in v0.5.0

type KanikoBuilder struct {
	*v1alpha2.BuildConfig
}

KanikoBuilder can build docker artifacts on Kubernetes, using Kaniko.

func NewKanikoBuilder added in v0.5.0

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

NewKanikoBuilder creates a KanikoBuilder.

func (*KanikoBuilder) Build added in v0.5.0

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

Build builds a list of artifacts with Kaniko.

func (*KanikoBuilder) Labels added in v0.8.0

func (k *KanikoBuilder) Labels() map[string]string

Labels gives labels to be set on artifacts deployed with Kaniko.

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) ([]Artifact, 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.

func (*LocalBuilder) Labels added in v0.8.0

func (l *LocalBuilder) Labels() map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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