appbuild

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const NoBuildFileError = `` /* 354-byte string literal not displayed */

NoBuildFileError is the user-facing missing build file error message.

Variables

This section is empty.

Functions

func DeployNameFromImage

func DeployNameFromImage(ref string) string

DeployNameFromImage returns the default app deployment name for an image ref.

func DetectAppName

func DetectAppName(dir string) (string, error)

DetectAppName returns a best-effort app name for a build context.

func EnsureBuildFile

func EnsureBuildFile(ctxDir string, file string, choose TemplateChooser) ([]string, string, error)

EnsureBuildFile creates a conservative Containerfile when no build file exists.

func NormalizeTag

func NormalizeTag(tag string, defaultRegistryHost string) (string, string, error)

NormalizeTag converts one user build tag into a local apps/ store tag.

func NormalizeTags

func NormalizeTags(tags []string, defaultRegistryHost string) ([]string, []string, error)

NormalizeTags converts user build tags into local store tags and display tags.

func ParseKeyValues

func ParseKeyValues(values []string) (map[string]string, error)

ParseKeyValues parses repeated KEY=VALUE flags.

func RegistryClusterID

func RegistryClusterID(ref string) string

RegistryClusterID returns the local cluster ID implied by an image ref host.

Types

type Options

type Options struct {
	ContextDir          string
	File                string
	Tags                []string
	Platform            string
	Arch                string
	BuildArgs           []string
	Labels              []string
	StoreRoot           string
	DefaultRegistryHost string
	Docker              string
	Pull                bool
	SBOM                bool
	ChooseTemplate      TemplateChooser
	Progress            func(string)
}

Options controls a Podplane app image build.

type Result

type Result struct {
	GeneratedFiles []string
	DetectedReason string
	DisplayTags    []string
	SBOMs          []string
}

Result describes a completed Podplane app image build.

func Build

func Build(ctx context.Context, opts Options) (*Result, error)

Build creates an app image in Podplane's local registry cache.

type TemplateChooser

type TemplateChooser func([]initfile.Match) (initfile.Match, bool, error)

TemplateChooser selects one template from multiple detected options.

Jump to

Keyboard shortcuts

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