imagebuild

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecipeFingerprint

func RecipeFingerprint(plan imageplan.Plan) (string, error)

func SmokeFingerprint

func SmokeFingerprint(plan imageplan.Plan) (string, error)

SmokeFingerprint versions the promotion policy independently from the byte-producing build recipe. Tightening a runtime assertion must revalidate an existing immutable image, but it must not force a byte-identical rebuild.

Types

type ApplyOptions

type ApplyOptions struct {
	// StageOnly builds or reuses the immutable alias and completes its smoke
	// test without changing current/previous aliases.
	StageOnly bool
}

type Artifacts

type Artifacts struct {
	Directory     string `json:"directory"`
	Checksums     string `json:"checksums"`
	Signature     string `json:"signature"`
	Metadata      string `json:"metadata"`
	Disk          string `json:"disk"`
	Rootfs        string `json:"rootfs,omitempty"`
	Runner        string `json:"runner"`
	CompilerCache string `json:"compiler_cache"`
	BrowserSmoke  string `json:"browser_smoke,omitempty"`
	// Toolchains maps each pinned toolchain name to its verified local archive.
	Toolchains map[string]string `json:"toolchains"`
	VerifiedBy string            `json:"verified_by"`
}

func FetchArtifacts

func FetchArtifacts(ctx context.Context, plan imageplan.Plan) (Artifacts, error)

func (Artifacts) Cleanup

func (a Artifacts) Cleanup() error

type CommandRunner

type CommandRunner interface {
	Run(context.Context, ...string) ([]byte, error)
}

type ExecRunner

type ExecRunner struct{ Path string }

func (ExecRunner) Run

func (r ExecRunner) Run(ctx context.Context, args ...string) ([]byte, error)

type Lock

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

func AcquireLock

func AcquireLock(path string) (*Lock, error)

func (*Lock) Close

func (l *Lock) Close() error

type Orchestrator

type Orchestrator struct {
	Runner CommandRunner
	// contains filtered or unexported fields
}

func (*Orchestrator) Apply

func (o *Orchestrator) Apply(ctx context.Context, plan imageplan.Plan, artifacts Artifacts) (Result, error)

func (*Orchestrator) ApplyWithOptions

func (o *Orchestrator) ApplyWithOptions(ctx context.Context, plan imageplan.Plan, artifacts Artifacts, options ApplyOptions) (Result, error)

type Result

type Result struct {
	Applied               bool           `json:"applied"`
	Built                 bool           `json:"built"`
	Promoted              bool           `json:"promoted"`
	ManifestFingerprint   string         `json:"manifest_fingerprint"`
	RecipeFingerprint     string         `json:"recipe_fingerprint"`
	SmokeFingerprint      string         `json:"smoke_fingerprint"`
	SourceFingerprint     string         `json:"source_fingerprint"`
	ImageFingerprint      string         `json:"image_fingerprint"`
	ImmutableAlias        string         `json:"immutable_alias"`
	CurrentAlias          string         `json:"current_alias"`
	PreviousFingerprint   string         `json:"previous_fingerprint,omitempty"`
	PackageManifestSHA256 string         `json:"package_manifest_sha256"`
	Smoke                 map[string]any `json:"smoke"`
}

Jump to

Keyboard shortcuts

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