pipeline

package
v0.19.4 Latest Latest
Warning

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

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

Documentation

Overview

Package pipeline implements the `apic pipeline` subcommand: the end-to-end orchestrator that runs gen -> vet -> build -> test -> fuzz -> bench and fails fast on the first failing step.

Index

Constants

This section is empty.

Variables

View Source
var OutputFunc = func(name string, args ...string) (string, error) {
	cmd := exec.Command(name, args...)
	var buf bytes.Buffer
	cmd.Stdout = &buf
	cmd.Stderr = &buf
	if err := cmd.Run(); err != nil {
		return buf.String(), err
	}
	return buf.String(), nil
}

OutputFunc runs an external command with stdout and stderr captured into a single buffer and returned as a string, for steps whose output the pipeline needs to inspect or report rather than stream live. It defaults to a plain os/exec.Command run; tests override it to stub out real process execution.

View Source
var ReadFileFunc = os.ReadFile

ReadFileFunc is the pipeline's indirection over os.ReadFile. It and WriteFileFunc back the docs-drift gate's read-mutate-restore sequence (N-06), overridable the same way RunFunc/OutputFunc are, so tests can exercise the fail-closed and always-restore behavior without touching the real docs/ tree.

View Source
var RunFunc = func(name string, args ...string) error {
	cmd := exec.Command(name, args...)
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	return cmd.Run()
}

RunFunc runs an external command with stdout/stderr wired straight through to the pipeline's own, for steps whose output the user should watch live (e.g. `go build`, `go test`). It defaults to a plain os/exec.Command run; tests override it to stub out real process execution.

View Source
var WriteFileFunc = os.WriteFile

WriteFileFunc is the pipeline's indirection over os.WriteFile, used by the docs-drift gate to restore docs/NEXT.md and docs/GAP_ANALYSIS.md to their original contents after a drift check (N-06). Defaults to os.WriteFile; tests override it to verify the restore step without touching real files.

Functions

func New

func New() *cobra.Command

New returns the `apic pipeline` command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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