Documentation
¶
Overview ¶
Package scaffold renders a starter cascade manifest and the matching reusable-workflow stubs for a project, so a new repository can adopt cascade with a working, self-consistent configuration on the first try.
The rendered output is verified before it is returned: Scaffold runs SelfCheck on its own files, which writes them to a temporary directory and confirms the manifest parses, validates, and generates orchestration workflows. A scaffold that cannot survive the real generator is never handed back to the caller.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Scaffold ¶
func Scaffold(project, trunkBranch string, envs []string, opts ...Option) (map[string]string, error)
Scaffold renders a starter manifest plus reusable-workflow stubs for project, trunkBranch, and the ordered envs list, returning a map of relative path to file content. When envs is empty the result is release-only: the manifest and build stub are produced with no deploys block and no deploy stub. The output is verified with SelfCheck before it is returned, and any SelfCheck failure is surfaced to the caller.
func SelfCheck ¶
SelfCheck writes files to a temporary directory and confirms the manifest parses, validates with zero problems, and drives the real workflow generators. The promote generator is exercised whenever the parsed config has deploys. All failures are wrapped with descriptive context.
func Topologies ¶
Topologies returns the preset environment-name lists keyed by topology name. Env names are applied positionally by Scaffold, so callers may substitute their own ordered names for any preset.
Types ¶
type Option ¶
type Option func(*scaffoldConfig)
Option customizes optional scaffold behavior. Required inputs are positional on Scaffold; Options form the variadic tail so new capability stays additive.
func WithCLIVersion ¶
WithCLIVersion overrides the cascade CLI version pinned in the generated manifest. An empty value is ignored so the default version is retained.