Documentation
¶
Overview ¶
Package build handles compiling cargoship binaries with appropriate compiler and linker flags.
Index ¶
Constants ¶
const (
BuildDir = "build"
)
BuildDir is where compiled binaries and other build artifacts are written.
Variables ¶
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 Binary ¶
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 ¶
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.