build

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const ErrorNoBuilder = Error("one or more valid builder configuration (Dockerfile or Jib configuration) must be present to build images with skaffold; please provide at least one build config and try again or run `skaffold init --skip-build`")
View Source
const NoBuilder = "None (image not built from these sources)"

NoBuilder allows users to specify they don't want to build an image we parse out from a Kubernetes manifest

Variables

This section is empty.

Functions

func PrintAnalyzeJSON

func PrintAnalyzeJSON(out io.Writer, skipBuild bool, pairs []BuilderImagePair, unresolvedBuilders []InitBuilder, unresolvedImages []string) error

printAnalyzeJSON takes the automatically resolved builder/image pairs, the unresolved images, and the unresolved builders, and generates a JSON string containing builder config information,

func PrintAnalyzeOldFormat

func PrintAnalyzeOldFormat(out io.Writer, skipBuild bool, pairs []BuilderImagePair, unresolvedBuilders []InitBuilder, unresolvedImages []string) error

TODO(nkubala): make these private again once DoInit() relinquishes control of the builder/image processing

Types

type BuilderImagePair

type BuilderImagePair struct {
	Builder   InitBuilder
	ImageName string
}

BuilderImagePair defines a builder and the image it builds

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type InitBuilder

type InitBuilder interface {
	// Name returns the name of the builder
	Name() string
	// Describe returns the initBuilder's string representation, used when prompting the user to choose a builder.
	// Must be unique between artifacts.
	Describe() string
	// UpdateArtifact updates the Artifact to be included in the generated Build Config
	UpdateArtifact(*latest.Artifact)
	// ConfiguredImage returns the target image configured by the builder, or an empty string if no image is configured.
	// This should be a cheap operation.
	ConfiguredImage() string
	// Path returns the path to the build file
	Path() string
}

InitBuilder represents a builder that can be chosen by skaffold init.

type Initializer

type Initializer interface {
	ProcessImages([]string) error
	BuildConfig() latest.BuildConfig
	BuilderImagePairs() []BuilderImagePair
	PrintAnalysis(io.Writer) error
}

func NewInitializer

func NewInitializer(builders []InitBuilder, c config.Config) Initializer

Jump to

Keyboard shortcuts

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