scaffold

package
v0.9.3-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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

func SelfCheck(files map[string]string) error

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

func Topologies() map[string][]string

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

func WithCLIVersion(v string) Option

WithCLIVersion overrides the cascade CLI version pinned in the generated manifest. An empty value is ignored so the default version is retained.

Jump to

Keyboard shortcuts

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