Documentation
¶
Index ¶
- func IsValidPhase(phase string) bool
- func NormalizePhase(phase string) string
- type AutomationConfig
- type Component
- type ComponentCompositionRef
- type ComponentInstance
- type ComponentManifest
- type ComponentOverrides
- type ComponentSchemaDocument
- type ComponentSchemaSpec
- type ComponentSubscribe
- type ComponentTree
- type ComponentTreeComponent
- type ComponentTreeDiscovery
- type ComponentTreeMetadata
- type CompositionConfig
- type CompositionDependency
- type CompositionDocument
- type CompositionDocumentSpec
- type CompositionExport
- type CompositionJobEntry
- type CompositionLock
- type CompositionLockSource
- type CompositionPackage
- type CompositionPackageOrun
- type CompositionPackageSpec
- type CompositionProfileEntry
- type CompositionResolution
- type CompositionSource
- type Dependency
- type Discovery
- type Environment
- type EnvironmentActivation
- type EnvironmentPromotion
- type EnvironmentSelectors
- type EnvironmentSubscription
- type ExecutionProfile
- type ExecutionProfileDocument
- type ExecutionProfileSpec
- type ExtendsRef
- type Group
- type Intent
- type IntentExecution
- type IntentExecutionState
- type IntentPreset
- type IntentPresetSpec
- type JobBinding
- type JobBindingSpec
- type JobConstraints
- type JobGraph
- type JobInstance
- type JobRef
- type JobRegistry
- type JobSpec
- type JobTemplateDocument
- type JobTemplateSpec
- type Metadata
- type NormalizedEvent
- type NormalizedIntent
- type Plan
- type PlanExecution
- type PlanJob
- type PlanMetadata
- type PlanPromotionGate
- type PlanScope
- type PlanSpec
- type PlanStep
- type PlanTrigger
- type PresetProvenance
- type ProfileJobSpec
- type ProfilePolicies
- type ProfileStepPatch
- type PromotionDependency
- type PromotionGate
- type PromotionMatch
- type RenderedStep
- type ResolvedCompositionSource
- type ResolvedDependency
- type ResourceRef
- type Stack
- type StackCompositionEntry
- type StackIntentPreset
- type StackMetadata
- type StackRegistry
- type StackSpec
- type Step
- type StepPhase
- type TriggerBinding
- type TriggerContext
- type TriggerMatch
- type TriggerPlanOptions
- type TriggerResolution
- type VerifyPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidPhase ¶
IsValidPhase checks whether a phase is one of pre/main/post.
func NormalizePhase ¶
NormalizePhase returns a normalized phase string and defaults empty values to "main".
Types ¶
type AutomationConfig ¶ added in v1.26.0
type AutomationConfig struct {
TriggerBindings map[string]TriggerBinding `yaml:"triggerBindings,omitempty" json:"triggerBindings,omitempty"`
}
AutomationConfig holds trigger binding declarations for CI/event-driven planning.
type Component ¶
type Component struct {
Name string `yaml:"name" json:"name"`
Type string `yaml:"type" json:"type"`
Domain string `yaml:"domain" json:"domain"`
Enabled bool `yaml:"enabled" json:"enabled"`
Path string `yaml:"path" json:"path"`
Subscribe ComponentSubscribe `yaml:"subscribe" json:"subscribe"`
CompositionRef *ComponentCompositionRef `yaml:"compositionRef,omitempty" json:"compositionRef,omitempty"`
Parameters map[string]interface{} `yaml:"parameters" json:"parameters"`
Overrides ComponentOverrides `yaml:"overrides" json:"overrides"`
Labels map[string]string `yaml:"labels" json:"labels"`
DependsOn []Dependency `yaml:"dependsOn" json:"dependsOn"`
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
ResolvedComposition string `yaml:"-" json:"-"`
ResolvedCompositionSource string `yaml:"-" json:"-"`
SourcePath string `yaml:"-" json:"-"`
}
Component is execution-agnostic declaration
type ComponentCompositionRef ¶
type ComponentCompositionRef struct {
Source string `yaml:"source,omitempty" json:"source,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
}
ComponentCompositionRef overrides the source used for a single component.
type ComponentInstance ¶
type ComponentInstance struct {
ComponentName string
Environment string
Type string
ResolvedComposition string
ResolvedCompositionSource string
Domain string
Path string
SourcePath string
Labels map[string]string
Parameters map[string]interface{}
Env map[string]string
StepOverrides []Step
Policies map[string]interface{}
DependsOn []ResolvedDependency
Enabled bool
ProfileRef string
ProfileName string
ProfileSource string
}
ComponentInstance is the expanded form of Component for a specific environment
type ComponentManifest ¶
type ComponentManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec Component `yaml:"spec" json:"spec"`
}
ComponentManifest is the CRD representation stored in component.yaml files.
type ComponentOverrides ¶
type ComponentOverrides struct {
Steps []Step `yaml:"steps" json:"steps"`
}
ComponentOverrides defines component-specific planner overrides.
type ComponentSchemaDocument ¶ added in v1.24.0
type ComponentSchemaDocument struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec ComponentSchemaSpec `yaml:"spec" json:"spec"`
}
ComponentSchemaDocument is the self-describing schema definition (kind: ComponentSchema).
type ComponentSchemaSpec ¶ added in v1.24.0
type ComponentSchemaSpec struct {
Type string `yaml:"type" json:"type"`
Schema map[string]interface{} `yaml:"schema" json:"schema"`
}
ComponentSchemaSpec defines the JSON schema for a component type.
type ComponentSubscribe ¶
type ComponentSubscribe struct {
Environments []EnvironmentSubscription `yaml:"environments" json:"environments"`
}
ComponentSubscribe declares which environments a component participates in.
func (ComponentSubscribe) EnvironmentNames ¶ added in v1.21.0
func (cs ComponentSubscribe) EnvironmentNames() []string
EnvironmentNames returns the list of environment names from subscriptions.
func (ComponentSubscribe) FindSubscription ¶ added in v1.21.0
func (cs ComponentSubscribe) FindSubscription(envName string) *EnvironmentSubscription
FindSubscription returns the subscription for a given environment name, or nil.
type ComponentTree ¶
type ComponentTree struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata ComponentTreeMetadata `yaml:"metadata" json:"metadata"`
Discovery ComponentTreeDiscovery `yaml:"discovery" json:"discovery"`
Components []ComponentTreeComponent `yaml:"components" json:"components"`
}
ComponentTree captures the discovered component graph for cache reuse.
type ComponentTreeComponent ¶
type ComponentTreeComponent struct {
Name string `yaml:"name" json:"name"`
Type string `yaml:"type" json:"type"`
Domain string `yaml:"domain,omitempty" json:"domain,omitempty"`
Enabled bool `yaml:"enabled" json:"enabled"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Subscribe ComponentSubscribe `yaml:"subscribe,omitempty" json:"subscribe,omitempty"`
Parameters map[string]interface{} `yaml:"parameters,omitempty" json:"parameters,omitempty"`
Overrides ComponentOverrides `yaml:"overrides,omitempty" json:"overrides,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
DependsOn []Dependency `yaml:"dependsOn,omitempty" json:"dependsOn,omitempty"`
Source string `yaml:"source" json:"source"`
SourcePath string `yaml:"sourcePath,omitempty" json:"sourcePath,omitempty"`
FileSize int64 `yaml:"fileSize,omitempty" json:"fileSize,omitempty"`
FileModTime string `yaml:"fileModTime,omitempty" json:"fileModTime,omitempty"`
}
ComponentTreeComponent stores a single component entry in the discovery cache.
func FromComponent ¶
func FromComponent(component Component, source string) ComponentTreeComponent
FromComponent creates a cache entry from the internal component model.
func (ComponentTreeComponent) ToComponent ¶
func (entry ComponentTreeComponent) ToComponent() Component
ToComponent converts a cache entry back into the internal component model.
type ComponentTreeDiscovery ¶
type ComponentTreeDiscovery struct {
Roots []string `yaml:"roots" json:"roots"`
}
ComponentTreeDiscovery records discovery settings used to build the tree.
type ComponentTreeMetadata ¶
type ComponentTreeMetadata struct {
Intent string `yaml:"intent" json:"intent"`
GeneratedAt string `yaml:"generatedAt" json:"generatedAt"`
}
ComponentTreeMetadata describes the cache document itself.
type CompositionConfig ¶
type CompositionConfig struct {
Sources []CompositionSource `yaml:"sources,omitempty" json:"sources,omitempty"`
Resolution CompositionResolution `yaml:"resolution,omitempty" json:"resolution,omitempty"`
}
CompositionConfig declares where composition definitions are loaded from.
type CompositionDependency ¶
type CompositionDependency struct {
Name string `yaml:"name" json:"name"`
Ref string `yaml:"ref" json:"ref"`
Optional bool `yaml:"optional,omitempty" json:"optional,omitempty"`
}
CompositionDependency captures optional transitive package references.
type CompositionDocument ¶
type CompositionDocument struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec CompositionDocumentSpec `yaml:"spec" json:"spec"`
}
CompositionDocument is the self-describing composition definition.
type CompositionDocumentSpec ¶
type CompositionDocumentSpec struct {
Type string `yaml:"type" json:"type"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
DefaultJob string `yaml:"defaultJob" json:"defaultJob"`
DefaultProfile string `yaml:"defaultProfile,omitempty" json:"defaultProfile,omitempty"`
SchemaRef *ResourceRef `yaml:"schemaRef,omitempty" json:"schemaRef,omitempty"`
ParameterSchema map[string]interface{} `yaml:"parameterSchema,omitempty" json:"parameterSchema,omitempty"`
ExecutionProfiles map[string]ExecutionProfile `yaml:"executionProfiles,omitempty" json:"executionProfiles,omitempty"`
Jobs []CompositionJobEntry `yaml:"jobs" json:"jobs"`
Profiles []CompositionProfileEntry `yaml:"profiles,omitempty" json:"profiles,omitempty"`
}
CompositionDocumentSpec is the portable contract for one composition type.
type CompositionExport ¶
type CompositionExport struct {
Composition string `yaml:"composition" json:"composition"`
Path string `yaml:"path" json:"path"`
}
CompositionExport maps a logical composition name to a file in the package.
type CompositionJobEntry ¶ added in v1.24.0
type CompositionJobEntry struct {
Name string `yaml:"name" json:"name"`
TemplateRef *ResourceRef `yaml:"templateRef,omitempty" json:"templateRef,omitempty"`
// Inline job fields (used when templateRef is nil)
Description string `yaml:"description,omitempty" json:"description,omitempty"`
RunsOn string `yaml:"runsOn,omitempty" json:"runsOn,omitempty"`
Timeout string `yaml:"timeout,omitempty" json:"timeout,omitempty"`
Retries int `yaml:"retries,omitempty" json:"retries,omitempty"`
Steps []Step `yaml:"steps,omitempty" json:"steps,omitempty"`
Inputs map[string]interface{} `yaml:"inputs,omitempty" json:"inputs,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
Capabilities []string `yaml:"capabilities,omitempty" json:"capabilities,omitempty"`
}
CompositionJobEntry represents a job in the composition — either inline or via templateRef.
func (CompositionJobEntry) ToJobSpec ¶ added in v1.24.0
func (e CompositionJobEntry) ToJobSpec() JobSpec
ToJobSpec converts a CompositionJobEntry to a JobSpec for internal use.
type CompositionLock ¶
type CompositionLock struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Sources []CompositionLockSource `yaml:"sources" json:"sources"`
}
CompositionLock records resolved source digests for reproducible planning.
type CompositionLockSource ¶
type CompositionLockSource struct {
Name string `yaml:"name" json:"name"`
Kind string `yaml:"kind" json:"kind"`
Ref string `yaml:"ref,omitempty" json:"ref,omitempty"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
ResolvedDigest string `yaml:"resolvedDigest" json:"resolvedDigest"`
Exports []string `yaml:"exports,omitempty" json:"exports,omitempty"`
}
CompositionLockSource stores one resolved source entry in the lock file.
type CompositionPackage ¶
type CompositionPackage struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec CompositionPackageSpec `yaml:"spec" json:"spec"`
}
CompositionPackage is the package manifest at the root of a composition package.
type CompositionPackageOrun ¶
type CompositionPackageOrun struct {
MinVersion string `yaml:"minVersion,omitempty" json:"minVersion,omitempty"`
}
CompositionPackageOrun constrains compatible orun versions.
type CompositionPackageSpec ¶
type CompositionPackageSpec struct {
Version string `yaml:"version" json:"version"`
Orun CompositionPackageOrun `yaml:"orun,omitempty" json:"orun,omitempty"`
Exports []CompositionExport `yaml:"exports" json:"exports"`
Dependencies []CompositionDependency `yaml:"dependencies,omitempty" json:"dependencies,omitempty"`
}
CompositionPackageSpec defines versioned exported compositions.
type CompositionProfileEntry ¶ added in v1.24.0
type CompositionProfileEntry struct {
Name string `yaml:"name" json:"name"`
ProfileRef *ResourceRef `yaml:"profileRef,omitempty" json:"profileRef,omitempty"`
}
CompositionProfileEntry represents a profile in the composition — either inline or via profileRef.
type CompositionResolution ¶
type CompositionResolution struct {
Precedence []string `yaml:"precedence,omitempty" json:"precedence,omitempty"`
Bindings map[string]string `yaml:"bindings,omitempty" json:"bindings,omitempty"`
}
CompositionResolution controls how exported composition types are selected.
type CompositionSource ¶
type CompositionSource struct {
Name string `yaml:"name" json:"name"`
Kind string `yaml:"kind" json:"kind"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Ref string `yaml:"ref,omitempty" json:"ref,omitempty"`
Digest string `yaml:"digest,omitempty" json:"digest,omitempty"`
PullPolicy string `yaml:"pullPolicy,omitempty" json:"pullPolicy,omitempty"`
Verify *VerifyPolicy `yaml:"verify,omitempty" json:"verify,omitempty"`
Metadata map[string]string `yaml:"metadata,omitempty" json:"metadata,omitempty"`
}
CompositionSource describes one source of composition packages.
type Dependency ¶
type Dependency struct {
Component string `yaml:"component" json:"component"`
Environment string `yaml:"environment" json:"environment"`
Scope string `yaml:"scope" json:"scope"` // same-environment, cross-environment
Condition string `yaml:"condition" json:"condition"` // success, always, failure
}
Dependency specifies inter-component execution constraints
type Discovery ¶
type Discovery struct {
Roots []string `yaml:"roots" json:"roots"`
}
Discovery limits repository scanning for external component manifests.
type Environment ¶
type Environment struct {
Path string `yaml:"path" json:"path"`
Activation EnvironmentActivation `yaml:"activation,omitempty" json:"activation,omitempty"`
Promotion EnvironmentPromotion `yaml:"promotion,omitempty" json:"promotion,omitempty"`
Selectors EnvironmentSelectors `yaml:"selectors" json:"selectors"`
ParameterDefaults map[string]map[string]interface{} `yaml:"parameterDefaults" json:"parameterDefaults"`
Policies map[string]interface{} `yaml:"policies" json:"policies"`
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
}
Environment defines environment runtime contexts
type EnvironmentActivation ¶ added in v1.26.0
type EnvironmentActivation struct {
TriggerRefs []string `yaml:"triggerRefs,omitempty" json:"triggerRefs,omitempty"`
}
EnvironmentActivation specifies which triggers activate an environment.
type EnvironmentPromotion ¶ added in v1.32.0
type EnvironmentPromotion struct {
DependsOn []PromotionDependency `yaml:"dependsOn,omitempty" json:"dependsOn,omitempty"`
}
EnvironmentPromotion declares ordering/gating relationships between environments.
type EnvironmentSelectors ¶
type EnvironmentSelectors struct {
Components []string `yaml:"components" json:"components"`
Domains []string `yaml:"domains" json:"domains"`
}
EnvironmentSelectors specifies which components apply to an environment
type EnvironmentSubscription ¶ added in v1.21.0
type EnvironmentSubscription struct {
Name string `yaml:"name" json:"name"`
Profile string `yaml:"profile,omitempty" json:"profile,omitempty"`
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
Parameters map[string]interface{} `yaml:"parameters,omitempty" json:"parameters,omitempty"`
}
EnvironmentSubscription specifies an environment binding with optional profile selection.
func (*EnvironmentSubscription) UnmarshalJSON ¶ added in v1.21.0
func (s *EnvironmentSubscription) UnmarshalJSON(data []byte) error
UnmarshalJSON supports both string and object forms for environment subscriptions in JSON.
func (*EnvironmentSubscription) UnmarshalYAML ¶ added in v1.21.0
func (s *EnvironmentSubscription) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML supports both string and object forms for environment subscriptions.
type ExecutionProfile ¶ added in v1.13.0
type ExecutionProfile struct {
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Policies *ProfilePolicies `yaml:"policies,omitempty" json:"policies,omitempty"`
Jobs map[string]ProfileJobSpec `yaml:"jobs" json:"jobs"`
}
ExecutionProfile is a named selection of jobs and steps from the composition.
type ExecutionProfileDocument ¶ added in v1.16.0
type ExecutionProfileDocument struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec ExecutionProfileSpec `yaml:"spec" json:"spec"`
}
ExecutionProfileDocument is the self-describing execution profile definition (kind: ExecutionProfile).
type ExecutionProfileSpec ¶ added in v1.16.0
type ExecutionProfileSpec struct {
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Policies *ProfilePolicies `yaml:"policies,omitempty" json:"policies,omitempty"`
Jobs map[string]ProfileJobSpec `yaml:"jobs" json:"jobs"`
}
ExecutionProfileSpec defines the behavior overlay for one execution context.
type ExtendsRef ¶ added in v1.34.0
type ExtendsRef struct {
Source string `yaml:"source" json:"source"`
Preset string `yaml:"preset" json:"preset"`
}
ExtendsRef references a preset from a composition source.
type Group ¶
type Group struct {
Path string `yaml:"path" json:"path"`
Policies map[string]interface{} `yaml:"policies" json:"policies"`
ParameterDefaults map[string]map[string]interface{} `yaml:"parameterDefaults" json:"parameterDefaults"`
}
Group defines ownership and policy constraints
type Intent ¶
type Intent struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Extends []ExtendsRef `yaml:"extends,omitempty" json:"extends,omitempty"`
Discovery Discovery `yaml:"discovery" json:"discovery"`
Compositions CompositionConfig `yaml:"compositions,omitempty" json:"compositions,omitempty"`
Automation AutomationConfig `yaml:"automation,omitempty" json:"automation,omitempty"`
Groups map[string]Group `yaml:"groups" json:"groups"`
Environments map[string]Environment `yaml:"environments" json:"environments"`
Components []Component `yaml:"components" json:"components"`
Execution IntentExecution `yaml:"execution,omitempty" json:"execution,omitempty"`
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
}
Intent is the top-level CRD for declarative deployment
type IntentExecution ¶ added in v1.12.0
type IntentExecution struct {
State IntentExecutionState `yaml:"state,omitempty" json:"state,omitempty"`
}
IntentExecution holds optional execution-layer configuration in intent.yaml.
type IntentExecutionState ¶ added in v1.12.0
type IntentExecutionState struct {
// Mode is "local" (default) or "remote".
Mode string `yaml:"mode,omitempty" json:"mode,omitempty"`
// BackendURL is the URL of the orun-backend instance for remote mode.
BackendURL string `yaml:"backendUrl,omitempty" json:"backendUrl,omitempty"`
}
IntentExecutionState configures where execution state is stored.
type IntentPreset ¶ added in v1.34.0
type IntentPreset struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec IntentPresetSpec `yaml:"spec" json:"spec"`
}
IntentPreset is the CRD for reusable intent scaffolding published by Stacks.
type IntentPresetSpec ¶ added in v1.34.0
type IntentPresetSpec struct {
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
Discovery Discovery `yaml:"discovery,omitempty" json:"discovery,omitempty"`
Automation AutomationConfig `yaml:"automation,omitempty" json:"automation,omitempty"`
Environments map[string]Environment `yaml:"environments,omitempty" json:"environments,omitempty"`
Groups map[string]Group `yaml:"groups,omitempty" json:"groups,omitempty"`
}
IntentPresetSpec holds the preset's declarative fields.
type JobBinding ¶
type JobBinding struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec JobBindingSpec `yaml:"spec" json:"spec"`
}
JobBinding is a k8s-style declarative binding between a model and its jobs
type JobBindingSpec ¶
type JobBindingSpec struct {
Model string `yaml:"model" json:"model"` // Model name (helm, terraform, charts, etc)
Jobs []JobRef `yaml:"jobs" json:"jobs"` // List of available jobs
DefaultJob string `yaml:"defaultJob" json:"defaultJob"` // Default job to execute
Constraints JobConstraints `yaml:"constraints,omitempty" json:"constraints,omitempty"`
}
JobBindingSpec specifies which jobs are available for a model
type JobConstraints ¶
type JobConstraints struct {
Platforms []string `yaml:"platforms,omitempty" json:"platforms,omitempty"` // kubernetes, docker, etc
MinVersion string `yaml:"minVersion,omitempty" json:"minVersion,omitempty"` // Minimum tool version
}
JobConstraints defines constraints for job execution
type JobGraph ¶
type JobGraph struct {
Jobs map[string]*JobInstance
Edges map[string][]string // jobID -> [dependentJobIDs]
}
JobGraph represents the logical DAG of all job instances
type JobInstance ¶
type JobInstance struct {
ID string
Name string
Component string
Environment string
Composition string
Profile string
ProfileSource string
RunsOn string
Path string
Steps []RenderedStep
DependsOn []string
Gates []PromotionGate
Timeout string
Retries int
Config map[string]interface{}
Parameters map[string]interface{}
Env map[string]string
Labels map[string]string
}
JobInstance is a materialized job for a component in an environment
type JobRef ¶
type JobRef struct {
Name string `yaml:"name" json:"name"`
Required bool `yaml:"required,omitempty" json:"required,omitempty"` // Must be included in plan
}
JobRef is a reference to a job by name
type JobRegistry ¶
type JobRegistry struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Jobs []JobSpec `yaml:"jobs" json:"jobs"`
}
JobRegistry holds all job definitions (k8s-style declarative format)
type JobSpec ¶
type JobSpec struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description" json:"description"`
RunsOn string `yaml:"runsOn,omitempty" json:"runsOn,omitempty"`
Timeout string `yaml:"timeout" json:"timeout"`
Retries int `yaml:"retries" json:"retries"`
Steps []Step `yaml:"steps" json:"steps"`
Inputs map[string]interface{} `yaml:"inputs" json:"inputs"`
Labels map[string]string `yaml:"labels" json:"labels"`
Capabilities []string `yaml:"capabilities,omitempty" json:"capabilities,omitempty"`
}
JobSpec defines a complete job specification with multiple steps
type JobTemplateDocument ¶ added in v1.24.0
type JobTemplateDocument struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec JobTemplateSpec `yaml:"spec" json:"spec"`
}
JobTemplateDocument is the self-describing job template definition (kind: JobTemplate).
type JobTemplateSpec ¶ added in v1.24.0
type JobTemplateSpec struct {
Description string `yaml:"description,omitempty" json:"description,omitempty"`
RunsOn string `yaml:"runsOn,omitempty" json:"runsOn,omitempty"`
Timeout string `yaml:"timeout,omitempty" json:"timeout,omitempty"`
Retries int `yaml:"retries,omitempty" json:"retries,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
Capabilities []string `yaml:"capabilities,omitempty" json:"capabilities,omitempty"`
Steps []Step `yaml:"steps" json:"steps"`
Inputs map[string]interface{} `yaml:"inputs,omitempty" json:"inputs,omitempty"`
}
JobTemplateSpec defines a reusable job template.
type Metadata ¶
type Metadata struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description" json:"description"`
Namespace string `yaml:"namespace" json:"namespace"`
}
Metadata holds standard object metadata
type NormalizedEvent ¶ added in v1.26.0
type NormalizedEvent struct {
Provider string
Event string
Action string
Ref string
RefType string // branch, tag, pull_request, unknown
Branch string
Tag string
BaseBranch string
BaseSHA string
HeadSHA string
Repository string
Actor string
Raw map[string]any
}
NormalizedEvent is the provider-neutral representation of a CI/webhook event.
type NormalizedIntent ¶
type NormalizedIntent struct {
Metadata Metadata
Groups map[string]Group
Environments map[string]Environment
Components map[string]Component
ComponentIndex map[string]Component // for fast lookup
Env map[string]string // root-level env from intent
}
NormalizedIntent is the canonical internal representation
type Plan ¶
type Plan struct {
APIVersion string `json:"apiVersion" yaml:"apiVersion"`
Kind string `json:"kind" yaml:"kind"`
Metadata PlanMetadata `json:"metadata" yaml:"metadata"`
Execution PlanExecution `json:"execution,omitempty" yaml:"execution,omitempty"`
Spec PlanSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
Jobs []PlanJob `json:"jobs" yaml:"jobs"`
}
Plan is the final execution-ready workflow DAG
type PlanExecution ¶
type PlanExecution struct {
Concurrency int `json:"concurrency,omitempty" yaml:"concurrency,omitempty"`
FailFast bool `json:"failFast" yaml:"failFast"`
StateFile string `json:"stateFile,omitempty" yaml:"stateFile,omitempty"`
}
PlanExecution defines runtime behavior for plan execution.
type PlanJob ¶
type PlanJob struct {
ID string `json:"id" yaml:"id"`
UID string `json:"uid,omitempty" yaml:"uid,omitempty"`
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
CheckName string `json:"checkName,omitempty" yaml:"checkName,omitempty"`
Name string `json:"name" yaml:"name"`
Component string `json:"component" yaml:"component"`
Environment string `json:"environment" yaml:"environment"`
Composition string `json:"composition,omitempty" yaml:"composition,omitempty"`
Profile string `json:"profile,omitempty" yaml:"profile,omitempty"`
ProfileSource string `json:"profileSource,omitempty" yaml:"profileSource,omitempty"`
JobRegistry string `json:"jobRegistry,omitempty" yaml:"jobRegistry,omitempty"` // Name of the JobRegistry used
Job string `json:"job,omitempty" yaml:"job,omitempty"` // Specific job from registry
RunsOn string `json:"runsOn,omitempty" yaml:"runsOn,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"` // Working directory for job execution
Steps []PlanStep `json:"steps" yaml:"steps"`
DependsOn []string `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty"`
Gates []PlanPromotionGate `json:"gates,omitempty" yaml:"gates,omitempty"`
Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
Retries int `json:"retries,omitempty" yaml:"retries,omitempty"`
Env map[string]interface{} `json:"env,omitempty" yaml:"env,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`
Parameters map[string]interface{} `json:"parameters,omitempty" yaml:"parameters,omitempty"`
}
PlanJob is the execution unit in the final plan
type PlanMetadata ¶
type PlanMetadata struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty" yaml:"generatedAt,omitempty"`
Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"`
Scope *PlanScope `json:"scope,omitempty" yaml:"scope,omitempty"`
Trigger *PlanTrigger `json:"trigger,omitempty" yaml:"trigger,omitempty"`
// WorkDir is the intent directory path relative to the workspace root
// (the directory where orun plan was invoked). orun run uses this when
// intent auto-discovery fails (e.g. in GHA where the intent lives in a
// subdirectory of GITHUB_WORKSPACE).
WorkDir string `json:"workDir,omitempty" yaml:"workDir,omitempty"`
}
PlanMetadata captures immutable plan generation details.
type PlanPromotionGate ¶ added in v1.32.0
type PlanPromotionGate struct {
Type string `json:"type" yaml:"type"`
Environment string `json:"environment" yaml:"environment"`
Component string `json:"component" yaml:"component"`
Condition string `json:"condition" yaml:"condition"`
Match map[string]string `json:"match" yaml:"match"`
}
PlanPromotionGate is a cross-plan evidence gate in the plan output.
type PlanScope ¶
type PlanScope struct {
DetectedComponent string `json:"detectedComponent" yaml:"detectedComponent"`
Components []string `json:"components" yaml:"components"`
}
PlanScope records the component scoping applied when the plan was generated.
type PlanSpec ¶
type PlanSpec struct {
JobBindings map[string]string `json:"jobBindings,omitempty" yaml:"jobBindings,omitempty"` // model -> JobRegistry name mapping
CompositionSources []ResolvedCompositionSource `json:"compositionSources,omitempty" yaml:"compositionSources,omitempty"`
}
PlanSpec holds specification about the plan and its bindings
type PlanStep ¶
type PlanStep struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Phase string `json:"phase,omitempty" yaml:"phase,omitempty"`
Order int `json:"order,omitempty" yaml:"order,omitempty"`
Run string `json:"run,omitempty" yaml:"run,omitempty"`
Use string `json:"use,omitempty" yaml:"use,omitempty"`
With map[string]interface{} `json:"with,omitempty" yaml:"with,omitempty"`
Env map[string]interface{} `json:"env,omitempty" yaml:"env,omitempty"`
Shell string `json:"shell,omitempty" yaml:"shell,omitempty"`
WorkingDirectory string `json:"working-directory,omitempty" yaml:"working-directory,omitempty"`
Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
Retry int `json:"retry,omitempty" yaml:"retry,omitempty"`
OnFailure string `json:"onFailure,omitempty" yaml:"onFailure,omitempty"`
}
PlanStep is a step in the final plan
type PlanTrigger ¶ added in v1.26.0
type PlanTrigger struct {
Mode string `json:"mode" yaml:"mode"`
Provider string `json:"provider,omitempty" yaml:"provider,omitempty"`
Event string `json:"event,omitempty" yaml:"event,omitempty"`
Action string `json:"action,omitempty" yaml:"action,omitempty"`
MatchedBindings []string `json:"matchedBindings" yaml:"matchedBindings"`
ActiveEnvironments []string `json:"activeEnvironments" yaml:"activeEnvironments"`
Scope string `json:"scope" yaml:"scope"`
Base string `json:"base,omitempty" yaml:"base,omitempty"`
Head string `json:"head,omitempty" yaml:"head,omitempty"`
}
PlanTrigger records which trigger bindings activated the plan.
type PresetProvenance ¶ added in v1.34.0
PresetProvenance tracks which preset contributed a field for explain output.
type ProfileJobSpec ¶ added in v1.21.0
type ProfileJobSpec struct {
StepsEnabled []string `yaml:"stepsEnabled,omitempty" json:"stepsEnabled,omitempty"`
IncludeCapabilities []string `yaml:"includeCapabilities,omitempty" json:"includeCapabilities,omitempty"`
StepOverrides map[string]ProfileStepPatch `yaml:"stepOverrides,omitempty" json:"stepOverrides,omitempty"`
}
ProfileJobSpec selects which steps from a base job are included in a profile.
type ProfilePolicies ¶ added in v1.24.0
type ProfilePolicies struct {
RequireCleanGitTree bool `yaml:"requireCleanGitTree,omitempty" json:"requireCleanGitTree,omitempty"`
RequirePinnedTerraformVersion bool `yaml:"requirePinnedTerraformVersion,omitempty" json:"requirePinnedTerraformVersion,omitempty"`
RequireApproval bool `yaml:"requireApproval,omitempty" json:"requireApproval,omitempty"`
}
ProfilePolicies defines enforcement rules for a profile.
type ProfileStepPatch ¶ added in v1.24.0
type ProfileStepPatch struct {
Run string `yaml:"run,omitempty" json:"run,omitempty"`
With map[string]interface{} `yaml:"with,omitempty" json:"with,omitempty"`
Env map[string]interface{} `yaml:"env,omitempty" json:"env,omitempty"`
}
ProfileStepPatch allows overriding specific fields of a step within a profile.
type PromotionDependency ¶ added in v1.32.0
type PromotionDependency struct {
Environment string `yaml:"environment" json:"environment"`
Strategy string `yaml:"strategy,omitempty" json:"strategy,omitempty"`
Condition string `yaml:"condition,omitempty" json:"condition,omitempty"`
Satisfy string `yaml:"satisfy,omitempty" json:"satisfy,omitempty"`
Match PromotionMatch `yaml:"match,omitempty" json:"match,omitempty"`
}
PromotionDependency specifies a dependency on another environment for promotion.
type PromotionGate ¶ added in v1.32.0
type PromotionGate struct {
Type string
Environment string
Component string
Condition string
Match map[string]string
}
PromotionGate is an evidence check for cross-plan environment promotion.
type PromotionMatch ¶ added in v1.32.0
type PromotionMatch struct {
Revision string `yaml:"revision,omitempty" json:"revision,omitempty"`
}
PromotionMatch specifies how to match evidence for cross-plan promotion gates.
type RenderedStep ¶
type RenderedStep struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Phase string `json:"phase,omitempty"`
Order int `json:"order,omitempty"`
Run string `json:"run,omitempty"`
Use string `json:"use,omitempty"`
With map[string]interface{} `json:"with,omitempty"`
Env map[string]interface{} `json:"env,omitempty"`
Shell string `json:"shell,omitempty"`
WorkingDirectory string `json:"workingDirectory,omitempty"`
Timeout string `json:"timeout"`
Retry int `json:"retry"`
OnFailure string `json:"onFailure"`
}
RenderedStep is a step with all templates resolved
type ResolvedCompositionSource ¶
type ResolvedCompositionSource struct {
Name string `json:"name" yaml:"name"`
Kind string `json:"kind" yaml:"kind"`
Ref string `json:"ref,omitempty" yaml:"ref,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
ResolvedDigest string `json:"resolvedDigest" yaml:"resolvedDigest"`
Exports []string `json:"exports,omitempty" yaml:"exports,omitempty"`
}
ResolvedCompositionSource records which sources were used to compile the plan.
type ResolvedDependency ¶
type ResolvedDependency struct {
ComponentName string
Environment string
Scope string
Condition string
}
ResolvedDependency is a dependency with resolved target component
type ResourceRef ¶ added in v1.24.0
type ResourceRef struct {
Name string `yaml:"name" json:"name"`
}
ResourceRef is a named reference to another resource in the same package.
type Stack ¶
type Stack struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata StackMetadata `yaml:"metadata" json:"metadata"`
Registry StackRegistry `yaml:"registry" json:"registry"`
Spec StackSpec `yaml:"spec" json:"spec"`
}
Stack is the new-format package manifest (replaces CompositionPackage / orun.yaml). It lives at stack.yaml in the package root and uses apiVersion: orun.io/v1.
type StackCompositionEntry ¶
type StackCompositionEntry struct {
Path string `yaml:"path" json:"path"`
}
StackCompositionEntry is a path reference to a compositions.yaml within the stack.
type StackIntentPreset ¶ added in v1.34.0
type StackIntentPreset struct {
Name string `yaml:"name" json:"name"`
Path string `yaml:"path" json:"path"`
}
StackIntentPreset references a preset file within a Stack package.
type StackMetadata ¶
type StackMetadata struct {
Name string `yaml:"name" json:"name"`
Title string `yaml:"title,omitempty" json:"title,omitempty"`
Version string `yaml:"version" json:"version"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Owner string `yaml:"owner,omitempty" json:"owner,omitempty"`
Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
}
StackMetadata holds human-facing metadata for a stack package.
type StackRegistry ¶
type StackRegistry struct {
Host string `yaml:"host" json:"host"`
Namespace string `yaml:"namespace" json:"namespace"`
Repository string `yaml:"repository" json:"repository"`
Visibility string `yaml:"visibility,omitempty" json:"visibility,omitempty"`
}
StackRegistry describes the OCI registry where the stack is published.
type StackSpec ¶
type StackSpec struct {
Compositions []StackCompositionEntry `yaml:"compositions,omitempty" json:"compositions,omitempty"`
IntentPresets []StackIntentPreset `yaml:"intentPresets,omitempty" json:"intentPresets,omitempty"`
}
StackSpec lists the composition files included in the stack. When Compositions is empty the packager auto-discovers every compositions.yaml found by walking the directory that contains stack.yaml.
type Step ¶
type Step struct {
ID string `yaml:"id,omitempty" json:"id,omitempty"`
Name string `yaml:"name" json:"name"`
Capability string `yaml:"capability,omitempty" json:"capability,omitempty"`
Phase string `yaml:"phase,omitempty" json:"phase,omitempty"`
Order int `yaml:"order,omitempty" json:"order,omitempty"`
Run string `yaml:"run,omitempty" json:"run,omitempty"`
Use string `yaml:"use,omitempty" json:"use,omitempty"`
With map[string]interface{} `yaml:"with,omitempty" json:"with,omitempty"`
Env map[string]interface{} `yaml:"env,omitempty" json:"env,omitempty"`
Shell string `yaml:"shell,omitempty" json:"shell,omitempty"`
WorkingDirectory string `yaml:"working-directory,omitempty" json:"working-directory,omitempty"`
Timeout string `yaml:"timeout,omitempty" json:"timeout,omitempty"`
Retry int `yaml:"retry,omitempty" json:"retry,omitempty"`
OnFailure string `yaml:"onFailure,omitempty" json:"onFailure,omitempty"` // stop, continue
}
Step is a single execution unit within a job
type TriggerBinding ¶ added in v1.26.0
type TriggerBinding struct {
Description string `yaml:"description,omitempty" json:"description,omitempty"`
On TriggerMatch `yaml:"on" json:"on"`
Plan TriggerPlanOptions `yaml:"plan,omitempty" json:"plan,omitempty"`
}
TriggerBinding maps a provider event to environment activation and plan scope.
type TriggerContext ¶ added in v1.26.0
type TriggerContext struct {
Mode string // none, named-trigger, event-file
TriggerName string
Event *NormalizedEvent
}
TriggerContext carries the trigger mode and data into the planner.
type TriggerMatch ¶ added in v1.26.0
type TriggerMatch struct {
Provider string `yaml:"provider" json:"provider"`
Event string `yaml:"event" json:"event"`
Actions []string `yaml:"actions,omitempty" json:"actions,omitempty"`
Branches []string `yaml:"branches,omitempty" json:"branches,omitempty"`
BaseBranches []string `yaml:"baseBranches,omitempty" json:"baseBranches,omitempty"`
Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
}
TriggerMatch defines the event filter criteria for a trigger binding.
type TriggerPlanOptions ¶ added in v1.26.0
type TriggerPlanOptions struct {
Scope string `yaml:"scope,omitempty" json:"scope,omitempty"`
Base string `yaml:"base,omitempty" json:"base,omitempty"`
Head string `yaml:"head,omitempty" json:"head,omitempty"`
}
TriggerPlanOptions controls how the plan is scoped when a trigger fires.
type TriggerResolution ¶ added in v1.26.0
type TriggerResolution struct {
MatchedTriggerNames []string
ActiveEnvironments []string
PlanScope string
Base string
Head string
}
TriggerResolution is the result of resolving triggers against environments.
type VerifyPolicy ¶
type VerifyPolicy struct {
Provider string `yaml:"provider,omitempty" json:"provider,omitempty"`
KeyRef string `yaml:"keyRef,omitempty" json:"keyRef,omitempty"`
Required bool `yaml:"required,omitempty" json:"required,omitempty"`
}
VerifyPolicy reserves room for future supply-chain verification settings.