Documentation ¶
Index ¶
- Constants
- func Artifacts(artifactInfos []ArtifactInfo) []*latestV1.Artifact
- func PrintAnalyzeJSON(out io.Writer, skipBuild bool, pairs []ArtifactInfo, ...) error
- func PrintAnalyzeOldFormat(out io.Writer, skipBuild bool, pairs []ArtifactInfo, ...) error
- type ArtifactInfo
- type GeneratedArtifactInfo
- type InitBuilder
- type Initializer
- type ManifestInfo
- type NoneBuilder
Constants ¶
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
const NoneBuilderName = "none"
Variables ¶
This section is empty.
Functions ¶
func Artifacts ¶ added in v1.5.0
func Artifacts(artifactInfos []ArtifactInfo) []*latestV1.Artifact
Artifacts takes builder image pairs and workspaces and creates a list of latestV1.Artifacts from the data.
func PrintAnalyzeJSON ¶
func PrintAnalyzeJSON(out io.Writer, skipBuild bool, pairs []ArtifactInfo, 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 []ArtifactInfo, unresolvedBuilders []InitBuilder, unresolvedImages []string) error
TODO(nkubala): make these private again once DoInit() relinquishes control of the builder/image processing
Types ¶
type ArtifactInfo ¶ added in v1.7.1
type ArtifactInfo struct { Builder InitBuilder ImageName string Workspace string Manifest ManifestInfo }
ArtifactInfo defines a builder and the image it builds
type GeneratedArtifactInfo ¶ added in v1.7.1
type GeneratedArtifactInfo struct { ArtifactInfo ManifestPath string }
GeneratedArtifactInfo pairs a discovered builder with a generated image name, and the path to the manifest that should be generated
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 // ArtifactType returns the type of the artifact to be built. Paths should be relative to the workspace. // To make skaffold.yaml more portable across OS-es we should always generate /-delimited filepaths. ArtifactType(workspace string) latestV1.ArtifactType // 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 is the entrypoint call, and handles the pairing of all builders // contained in the initializer with the provided images from the deploy initializer ProcessImages([]string) error // BuildConfig returns the processed build config to be written to the skaffold.yaml BuildConfig() (latestV1.BuildConfig, []*latestV1.PortForwardResource) // PrintAnalysis writes the project analysis to the provided out stream PrintAnalysis(io.Writer) error // GenerateManifests generates image names and manifests for all unresolved pairs GenerateManifests(out io.Writer, force, enableManifestGeneration bool) (map[GeneratedArtifactInfo][]byte, error) }
func NewInitializer ¶
func NewInitializer(builders []InitBuilder, c config.Config) Initializer
type ManifestInfo ¶ added in v1.32.0
type NoneBuilder ¶ added in v1.32.0
type NoneBuilder struct{}
func (NoneBuilder) ArtifactType ¶ added in v1.32.0
func (b NoneBuilder) ArtifactType(string) latestV1.ArtifactType
func (NoneBuilder) ConfiguredImage ¶ added in v1.32.0
func (b NoneBuilder) ConfiguredImage() string
func (NoneBuilder) Describe ¶ added in v1.32.0
func (b NoneBuilder) Describe() string
func (NoneBuilder) Name ¶ added in v1.32.0
func (b NoneBuilder) Name() string
func (NoneBuilder) Path ¶ added in v1.32.0
func (b NoneBuilder) Path() string