config

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ImplicitPhaseName = "default"

Variables

This section is empty.

Functions

func StateKeyWithContext added in v0.2.6

func StateKeyWithContext(baseStateKey string, contextFingerprint string) string

func WorkflowRootForPath

func WorkflowRootForPath(localPath string) (string, error)

Types

type LoadOptions

type LoadOptions struct {
	VarOverrides   map[string]any
	VarsFiles      []string
	NodeScopedVars bool
	Hostname       string
	DetectHostname func() (string, error)
}

type Phase

type Phase struct {
	Name           string        `yaml:"name" json:"name"`
	MaxParallelism int           `yaml:"maxParallelism,omitempty" json:"maxParallelism,omitempty"`
	Imports        []PhaseImport `yaml:"imports,omitempty" json:"imports,omitempty"`
	Steps          []Step        `yaml:"steps,omitempty" json:"steps,omitempty"`
}

func NormalizedPhases

func NormalizedPhases(wf *Workflow) []Phase

type PhaseImport

type PhaseImport struct {
	Path string `yaml:"path" json:"path"`
	When string `yaml:"when,omitempty" json:"when,omitempty"`
}

type Step

type Step struct {
	ID            string            `yaml:"id" json:"id"`
	APIVersion    string            `yaml:"apiVersion" json:"apiVersion"`
	Kind          string            `yaml:"kind" json:"kind"`
	Metadata      map[string]any    `yaml:"metadata" json:"metadata,omitempty"`
	When          string            `yaml:"when" json:"when,omitempty"`
	ParallelGroup string            `yaml:"parallelGroup,omitempty" json:"parallelGroup,omitempty"`
	Register      map[string]string `yaml:"register" json:"register,omitempty"`
	Retry         int               `yaml:"retry" json:"retry,omitempty"`
	Timeout       string            `yaml:"timeout" json:"timeout,omitempty"`
	Spec          map[string]any    `yaml:"spec" json:"spec"`
}

type Workflow

type Workflow struct {
	Version        string         `yaml:"version" json:"version"`
	Vars           map[string]any `yaml:"vars" json:"vars,omitempty"`
	Phases         []Phase        `yaml:"phases,omitempty" json:"phases,omitempty"`
	Steps          []Step         `yaml:"steps,omitempty" json:"-"`
	StateKey       string         `yaml:"-" json:"-"`
	WorkflowSHA256 string         `yaml:"-" json:"-"`
}

func Load

func Load(ctx context.Context, source string) (*Workflow, error)

func LoadWithOptions

func LoadWithOptions(ctx context.Context, source string, opts LoadOptions) (*Workflow, error)

Jump to

Keyboard shortcuts

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