Documentation
¶
Overview ¶
Package builder validates and executes source-image build plans declared by catalog components. Coverage capabilities are declared by each product in CoverageSpec; this package validates the contract and does not identify products by name or maintain product Dockerfiles.
Index ¶
- func Build(ctx context.Context, spec Spec, req Request) error
- func BuildMany(ctx context.Context, specs []Spec, req Request) error
- func BuildProducts(ctx context.Context, products []Product, repoRoot string, runner Runner, ...) error
- func CoverageBuildArgs(spec CoverageSpec) []string
- type BrowserCoverageSpec
- type Command
- type CoverageSpec
- type CoverageType
- type ExecRunner
- type Image
- type Product
- type Request
- type Runner
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProducts ¶
func BuildProducts(ctx context.Context, products []Product, repoRoot string, runner Runner, coverage bool) error
BuildProducts builds products with independent versions in declaration order.
func CoverageBuildArgs ¶
func CoverageBuildArgs(spec CoverageSpec) []string
CoverageBuildArgs returns deterministic Docker build arguments for a coverage mode.
Types ¶
type BrowserCoverageSpec ¶
type BrowserCoverageSpec struct {
Supported bool
Include []string
Exclude []string
SourceRoot string
SourceMapRoot string
OutputDir string
}
BrowserCoverageSpec describes browser-side source files and report output.
type CoverageSpec ¶
type CoverageSpec struct {
Supported bool
Types []CoverageType
Packages []string
Include []string
OutputDir string
BuildArgs map[string]string
Environment map[string]string
Browser BrowserCoverageSpec
}
CoverageSpec describes a product's coverage capability.
type CoverageType ¶
type CoverageType string
CoverageType identifies the instrumentation format produced by a build.
const ( // GoCoverage identifies Go coverage counter data. GoCoverage CoverageType = "go" // NodeV8Coverage identifies Node.js V8 coverage data. NodeV8Coverage CoverageType = "node-v8" // BrowserJSCoverage identifies JavaScript coverage collected from a Chromium page. BrowserJSCoverage CoverageType = "browser-js" )
type ExecRunner ¶
type ExecRunner struct{}
ExecRunner runs commands through the host process environment.
type Spec ¶
type Spec struct {
Component string
SourceDir string
Images []Image
Coverage CoverageSpec
Plan func(root, version string, coverage CoverageSpec) ([]Command, error)
}
Spec describes how a catalog component is built from source.