Documentation
¶
Overview ¶
Package release owns the build, test, package, and publish lifecycle.
Index ¶
- func CurrentInventoryHead(ctx context.Context, runner pkgit.Runner) (string, error)
- func Run(ctx context.Context, directory string, backend Backend, options ...Option) (*pluginoci.Release, error)
- func RunInventory(ctx context.Context, entries []releaseplan.Entry, factory BackendFactory, ...) ([]*pluginoci.Release, error)
- type Backend
- type BackendFactory
- type InventoryOption
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentInventoryHead ¶
CurrentInventoryHead fetches the remote default branch at reconciliation time. Reading FETCH_HEAD pins the accepted snapshot independently of a queued run's older checkout. Callers serialize publication before invoking this function.
func Run ¶
func Run(ctx context.Context, directory string, backend Backend, options ...Option) (*pluginoci.Release, error)
Run validates source, builds all targets, tests the host target, and publishes a verified layout. Temporary layouts are removed on success and failure.
func RunInventory ¶
func RunInventory(ctx context.Context, entries []releaseplan.Entry, factory BackendFactory, options ...InventoryOption) ([]*pluginoci.Release, error)
RunInventory processes packages in plan order, using detached source snapshots. Target compilation remains bounded and parallel within each package. The caller retains its checkout, including uncommitted files, throughout the operation.
Types ¶
type Backend ¶
type Backend interface {
Validate(context.Context, string) error
Build(context.Context, string) error
Test(context.Context, string) error
Pack(context.Context, string, string) error
Publish(context.Context, string) (*pluginoci.Release, error)
}
Backend supplies the release operations. Test must execute only the current host's binary; Pack verifies the payloads for every declared platform.
type BackendFactory ¶
type BackendFactory func(releaseplan.Entry, string) Backend
BackendFactory binds publication settings and the isolated repository to a package.
type InventoryOption ¶
type InventoryOption func(*inventorySettings)
InventoryOption configures execution of committed inventory entries.
func WithInventoryCheck ¶
func WithInventoryCheck(check bool) InventoryOption
WithInventoryCheck checks packages without publishing them.
func WithInventoryRunner ¶
func WithInventoryRunner(runner pkgit.Runner) InventoryOption
WithInventoryRunner injects repository access.
func WithInventoryTemporaryDirectory ¶
func WithInventoryTemporaryDirectory(directory string) InventoryOption
WithInventoryTemporaryDirectory selects the parent of isolated source trees.