build

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package build handles compiling cargoship binaries with appropriate compiler and linker flags.

Index

Constants

View Source
const (
	BuildDir = "build"
)

BuildDir is where compiled binaries and other build artifacts are written.

Variables

View Source
var ZarfModules = map[string]string{
	"zarf_init":           "./cmd/zarf/init",
	"zarf_package_deploy": "./cmd/zarf/deploy",
}

ZarfModules are the Ansible module files of the colonel_byte.zarf collection, keyed by the binary name they are installed under. See docs/agent/choice-zarf-ansible-module.md.

Functions

func All

func All() error

All compiles release binaries for all standard release OS/arch targets.

func Binary

func Binary(oper, arch string) error

Binary compiles a cargoship binary for the specified OS and architecture into build/.

The source is ./cmd/cargoship rather than the root ./main.go: the root entry point is for `go run .` during development and leaves out the Ansible module dispatch. See main.go.

func ExampleDefinitions

func ExampleDefinitions() ([]string, error)

ExampleDefinitions returns every directory under example/ holding a distro.yaml, sorted so a run covers the flavors in a stable order.

func Examples

func Examples() error

Examples builds a package from every example definition, with the cargoship on PATH.

func ZarfModuleFiles added in v0.30.0

func ZarfModuleFiles() error

ZarfModuleFiles builds every zarf Ansible module file for this host into build/.

They are built for the host rather than for a release target list because what drives them is the e2e suite and an operator reproducing a module run; the release builds come from .goreleaser.yaml. No version is stamped in: a module file reports what zarf did, and has no version of its own to report.

Types

This section is empty.

Jump to

Keyboard shortcuts

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