Documentation
¶
Index ¶
- func IsValidPhase(phase string) bool
- func NormalizePhase(phase string) string
- type AutomationTrigger
- type Component
- type ComponentCompositionRef
- type ComponentInstance
- type ComponentManifest
- type ComponentOverrides
- type ComponentSubscribe
- type ComponentTree
- type ComponentTreeComponent
- type ComponentTreeDiscovery
- type ComponentTreeMetadata
- type CompositionConfig
- type CompositionDependency
- type CompositionDocument
- type CompositionDocumentSpec
- type CompositionExport
- type CompositionLock
- type CompositionLockSource
- type CompositionPackage
- type CompositionPackageOrun
- type CompositionPackageSpec
- type CompositionResolution
- type CompositionSource
- type Dependency
- type Discovery
- type Environment
- type EnvironmentExecution
- type EnvironmentSelectors
- type EventContext
- type ExecutionProfile
- type ExecutionProfileDocument
- type ExecutionProfileSpec
- type Group
- type Intent
- type IntentAutomation
- type IntentExecution
- type IntentExecutionState
- type IntentStackRef
- type JobBinding
- type JobBindingSpec
- type JobConstraints
- type JobGraph
- type JobInstance
- type JobRef
- type JobRegistry
- type JobSpec
- type Metadata
- type NormalizedIntent
- type OverridePolicyAllow
- type OverridePolicyControl
- type OverridePolicyEnvironments
- type OverridePolicyIntent
- type OverridePolicyProfile
- type Plan
- type PlanExecution
- type PlanJob
- type PlanMetadata
- type PlanScope
- type PlanSpec
- type PlanStep
- type ProfilePlan
- type RenderedStep
- type ResolvedCompositionSource
- type ResolvedDependency
- type SkippedJob
- type Stack
- type StackCompositionEntry
- type StackExportEntry
- type StackMetadata
- type StackOverridePolicyDocument
- type StackOverridePolicySpec
- type StackRegistry
- type StackSpec
- type Step
- type StepPhase
- type SubscriptionEntry
- type TriggerBindingDocument
- type TriggerBindingSpec
- type TriggerOn
- type TriggerPlan
- type TriggerPlanRef
- 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 AutomationTrigger ¶ added in v1.14.0
type AutomationTrigger struct {
Name string `yaml:"name" json:"name"`
On TriggerOn `yaml:"on" json:"on"`
Plan TriggerPlan `yaml:"plan" json:"plan"`
}
AutomationTrigger maps a CI event to an execution profile.
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"`
Inputs map[string]interface{} `yaml:"inputs" json:"inputs"`
Overrides ComponentOverrides `yaml:"overrides" json:"overrides"`
Labels map[string]string `yaml:"labels" json:"labels"`
DependsOn []Dependency `yaml:"dependsOn" json:"dependsOn"`
ControlOverrides map[string]interface{} `yaml:"controlOverrides,omitempty" json:"controlOverrides,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
Inputs map[string]interface{}
StepOverrides []Step
Policies map[string]interface{}
DependsOn []ResolvedDependency
Enabled bool
Controls map[string]interface{}
ResolvedProfile string
ResolvedTriggerBinding 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 ComponentSubscribe ¶
type ComponentSubscribe struct {
Environments []string `yaml:"-" json:"environments,omitempty"`
Entries []SubscriptionEntry `yaml:"-" json:"entries,omitempty"`
}
ComponentSubscribe declares which environments a component participates in. Supports two YAML formats:
- Old: {environments: [dev, staging]}
- New: [{environments: [dev], profile: dry-run}, {environments: [staging]}]
func (ComponentSubscribe) MarshalYAML ¶ added in v1.18.0
func (cs ComponentSubscribe) MarshalYAML() (interface{}, error)
func (*ComponentSubscribe) UnmarshalYAML ¶ added in v1.18.0
func (cs *ComponentSubscribe) UnmarshalYAML(value *yaml.Node) error
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"`
Inputs map[string]interface{} `yaml:"inputs,omitempty" json:"inputs,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"`
InputSchema map[string]interface{} `yaml:"inputSchema,omitempty" json:"inputSchema,omitempty"`
ControlSchema map[string]interface{} `yaml:"controlSchema,omitempty" json:"controlSchema,omitempty"`
ControlDefaults map[string]interface{} `yaml:"controlDefaults,omitempty" json:"controlDefaults,omitempty"`
Jobs []JobSpec `yaml:"jobs" json:"jobs"`
}
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 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 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"`
Selectors EnvironmentSelectors `yaml:"selectors" json:"selectors"`
Defaults map[string]interface{} `yaml:"defaults" json:"defaults"`
Policies map[string]interface{} `yaml:"policies" json:"policies"`
Execution EnvironmentExecution `yaml:"execution,omitempty" json:"execution,omitempty"`
}
Environment defines environment runtime contexts
type EnvironmentExecution ¶ added in v1.13.0
type EnvironmentExecution struct {
Profile string `yaml:"profile,omitempty" json:"profile,omitempty"`
TriggerBindings []string `yaml:"triggerBindings,omitempty" json:"triggerBindings,omitempty"`
Profiles map[string]string `yaml:"profiles,omitempty" json:"profiles,omitempty"`
ControlOverrides map[string]map[string]interface{} `yaml:"controlOverrides,omitempty" json:"controlOverrides,omitempty"`
}
EnvironmentExecution selects an execution profile and optional control overrides.
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 EventContext ¶ added in v1.14.0
type EventContext struct {
Provider string `json:"provider"`
Event string `json:"event"`
Action string `json:"action,omitempty"`
Ref string `json:"ref,omitempty"`
BaseRef string `json:"baseRef,omitempty"`
BaseSha string `json:"baseSha,omitempty"`
HeadSha string `json:"headSha,omitempty"`
Branch string `json:"branch,omitempty"`
IsFork bool `json:"isFork,omitempty"`
Actor string `json:"actor,omitempty"`
Repository string `json:"repository,omitempty"`
}
EventContext is a provider-neutral representation of a CI event.
type ExecutionProfile ¶ added in v1.13.0
type ExecutionProfile struct {
Description string `yaml:"description,omitempty" json:"description,omitempty"`
CompositionRef string `yaml:"compositionRef,omitempty" json:"compositionRef,omitempty"`
Plan ProfilePlan `yaml:"plan,omitempty" json:"plan,omitempty"`
Controls map[string]map[string]interface{} `yaml:"controls,omitempty" json:"controls,omitempty"`
}
ExecutionProfile defines a named set of controls per composition type.
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 standalone file format for a profile in a stack.
type ExecutionProfileSpec ¶ added in v1.16.0
type ExecutionProfileSpec struct {
Description string `yaml:"description,omitempty" json:"description,omitempty"`
CompositionRef string `yaml:"compositionRef,omitempty" json:"compositionRef,omitempty"`
Plan ProfilePlan `yaml:"plan,omitempty" json:"plan,omitempty"`
Controls map[string]map[string]interface{} `yaml:"controls,omitempty" json:"controls,omitempty"`
}
ExecutionProfileSpec is the spec section of a standalone profile document.
type Group ¶
type Group struct {
Path string `yaml:"path" json:"path"`
Policies map[string]interface{} `yaml:"policies" json:"policies"`
Defaults map[string]interface{} `yaml:"defaults" json:"defaults"`
}
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"`
Discovery Discovery `yaml:"discovery" json:"discovery"`
Stacks []IntentStackRef `yaml:"stacks,omitempty" json:"stacks,omitempty"`
Compositions CompositionConfig `yaml:"compositions,omitempty" json:"compositions,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"`
Automation IntentAutomation `yaml:"automation,omitempty" json:"automation,omitempty"`
}
Intent is the top-level CRD for declarative deployment
type IntentAutomation ¶ added in v1.14.0
type IntentAutomation struct {
Triggers []AutomationTrigger `yaml:"triggers,omitempty" json:"triggers,omitempty"`
TriggerBindings []AutomationTrigger `yaml:"triggerBindings,omitempty" json:"triggerBindings,omitempty"`
}
IntentAutomation holds the automation section of an intent.
type IntentExecution ¶ added in v1.12.0
type IntentExecution struct {
State IntentExecutionState `yaml:"state,omitempty" json:"state,omitempty"`
Profiles map[string]ExecutionProfile `yaml:"profiles,omitempty" json:"profiles,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 IntentStackRef ¶ added in v1.16.0
type IntentStackRef struct {
Name string `yaml:"name" json:"name"`
Source CompositionSource `yaml:"source" json:"source"`
}
IntentStackRef references a stack package by name and source.
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
RunsOn string
Path string
Steps []RenderedStep
DependsOn []string
Timeout string
Retries int
Config map[string]interface{} // Single source of truth for env vars
Labels map[string]string
Controls map[string]interface{}
ResolvedProfile string
ResolvedTriggerBinding string
Skipped bool
SkipReason string
RequiresApproval bool
}
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"`
When string `yaml:"when,omitempty" json:"when,omitempty"`
Capabilities []string `yaml:"capabilities,omitempty" json:"capabilities,omitempty"`
}
JobSpec defines a complete job specification with multiple steps
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 NormalizedIntent ¶
type NormalizedIntent struct {
Metadata Metadata
Execution IntentExecution
Automation IntentAutomation
Groups map[string]Group
Environments map[string]Environment
Components map[string]Component
ComponentIndex map[string]Component
OverridePolicy *StackOverridePolicySpec
}
NormalizedIntent is the canonical internal representation
type OverridePolicyAllow ¶ added in v1.16.0
type OverridePolicyAllow struct {
Intent OverridePolicyIntent `yaml:"intent,omitempty" json:"intent,omitempty"`
}
OverridePolicyAllow defines what the intent is allowed to override.
type OverridePolicyControl ¶ added in v1.16.0
type OverridePolicyControl struct {
Type string `yaml:"type,omitempty" json:"type,omitempty"`
AllowedValues []interface{} `yaml:"allowedValues,omitempty" json:"allowedValues,omitempty"`
}
OverridePolicyControl specifies constraints on an individual control override.
type OverridePolicyEnvironments ¶ added in v1.16.0
type OverridePolicyEnvironments struct {
Defaults []string `yaml:"defaults,omitempty" json:"defaults,omitempty"`
Policies []string `yaml:"policies,omitempty" json:"policies,omitempty"`
}
OverridePolicyEnvironments specifies which environment defaults/policies may be set.
type OverridePolicyIntent ¶ added in v1.16.0
type OverridePolicyIntent struct {
Environments OverridePolicyEnvironments `yaml:"environments,omitempty" json:"environments,omitempty"`
Profiles map[string]OverridePolicyProfile `yaml:"profiles,omitempty" json:"profiles,omitempty"`
}
OverridePolicyIntent specifies allowed overrides at the intent level.
type OverridePolicyProfile ¶ added in v1.16.0
type OverridePolicyProfile struct {
Controls map[string]map[string]OverridePolicyControl `yaml:"controls,omitempty" json:"controls,omitempty"`
}
OverridePolicyProfile specifies allowed control overrides for a profile.
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"`
SkippedJobs []SkippedJob `json:"skippedJobs,omitempty" yaml:"skippedJobs,omitempty"`
}
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"`
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"`
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"`
Controls map[string]interface{} `json:"controls,omitempty" yaml:"controls,omitempty"`
ResolvedProfile string `json:"resolvedProfile,omitempty" yaml:"resolvedProfile,omitempty"`
TriggerBinding string `json:"triggerBinding,omitempty" yaml:"triggerBinding,omitempty"`
Skipped bool `json:"skipped,omitempty" yaml:"skipped,omitempty"`
SkipReason string `json:"skipReason,omitempty" yaml:"skipReason,omitempty"`
RequiresApproval bool `json:"requiresApproval,omitempty" yaml:"requiresApproval,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"`
// 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"`
Profile string `json:"profile,omitempty" yaml:"profile,omitempty"`
Trigger string `json:"trigger,omitempty" yaml:"trigger,omitempty"`
}
PlanMetadata captures immutable plan generation details.
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"`
When string `json:"when,omitempty" yaml:"when,omitempty"`
Skipped bool `json:"skipped,omitempty" yaml:"skipped,omitempty"`
SkipReason string `json:"skipReason,omitempty" yaml:"skipReason,omitempty"`
}
PlanStep is a step in the final plan
type ProfilePlan ¶ added in v1.14.0
type ProfilePlan struct {
Scope string `yaml:"scope,omitempty" json:"scope,omitempty"`
}
ProfilePlan holds plan-generation settings for an execution profile.
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"`
When string `json:"when,omitempty"`
Skipped bool `json:"skipped,omitempty"`
SkipReason string `json:"skipReason,omitempty"`
}
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 SkippedJob ¶ added in v1.13.0
type SkippedJob struct {
ID string `json:"id" yaml:"id"`
Component string `json:"component" yaml:"component"`
Environment string `json:"environment" yaml:"environment"`
Job string `json:"job" yaml:"job"`
Reason string `json:"reason" yaml:"reason"`
}
SkippedJob records a job that was omitted from execution.
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 StackExportEntry ¶ added in v1.16.0
type StackExportEntry struct {
Name string `yaml:"name" json:"name"`
Path string `yaml:"path" json:"path"`
}
StackExportEntry is a named path reference to a resource file within the stack.
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 StackOverridePolicyDocument ¶ added in v1.16.0
type StackOverridePolicyDocument struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec StackOverridePolicySpec `yaml:"spec" json:"spec"`
}
StackOverridePolicyDocument is the standalone file format for an override policy.
type StackOverridePolicySpec ¶ added in v1.16.0
type StackOverridePolicySpec struct {
Default string `yaml:"default" json:"default"`
Allow OverridePolicyAllow `yaml:"allow,omitempty" json:"allow,omitempty"`
Deny []string `yaml:"deny,omitempty" json:"deny,omitempty"`
}
StackOverridePolicySpec defines what intent-level overrides are allowed.
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"`
Profiles []StackExportEntry `yaml:"profiles,omitempty" json:"profiles,omitempty"`
Triggers []StackExportEntry `yaml:"triggers,omitempty" json:"triggers,omitempty"`
OverridePolicy *StackExportEntry `yaml:"overridePolicy,omitempty" json:"overridePolicy,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"`
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
When string `yaml:"when,omitempty" json:"when,omitempty"`
}
Step is a single execution unit within a job
type SubscriptionEntry ¶ added in v1.18.0
type SubscriptionEntry struct {
Environments []string `yaml:"environments" json:"environments"`
Profile string `yaml:"profile,omitempty" json:"profile,omitempty"`
TriggerBindings []string `yaml:"triggerBindings,omitempty" json:"triggerBindings,omitempty"`
}
SubscriptionEntry is a rich subscription binding environments to optional profile/triggerBinding overrides.
type TriggerBindingDocument ¶ added in v1.16.0
type TriggerBindingDocument struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata Metadata `yaml:"metadata" json:"metadata"`
Spec TriggerBindingSpec `yaml:"spec" json:"spec"`
}
TriggerBindingDocument is the standalone file format for a trigger in a stack.
type TriggerBindingSpec ¶ added in v1.16.0
type TriggerBindingSpec struct {
On TriggerOn `yaml:"on" json:"on"`
Plan TriggerPlanRef `yaml:"plan" json:"plan"`
}
TriggerBindingSpec is the spec section of a standalone trigger document.
type TriggerOn ¶ added in v1.14.0
type TriggerOn struct {
Provider string `yaml:"provider,omitempty" json:"provider,omitempty"`
Event string `yaml:"event" json:"event"`
Actions []string `yaml:"actions,omitempty" json:"actions,omitempty"`
Branches []string `yaml:"branches,omitempty" json:"branches,omitempty"`
Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
}
TriggerOn defines the event conditions that activate a trigger.
type TriggerPlan ¶ added in v1.14.0
type TriggerPlan struct {
Profile string `yaml:"profile,omitempty" json:"profile,omitempty"`
Scope string `yaml:"scope,omitempty" json:"scope,omitempty"`
Base string `yaml:"base,omitempty" json:"base,omitempty"`
Head string `yaml:"head,omitempty" json:"head,omitempty"`
}
TriggerPlan specifies which execution profile a trigger selects.
type TriggerPlanRef ¶ added in v1.16.0
type TriggerPlanRef struct {
ProfileRef string `yaml:"profileRef,omitempty" json:"profileRef,omitempty"`
Scope string `yaml:"scope,omitempty" json:"scope,omitempty"`
Base string `yaml:"base,omitempty" json:"base,omitempty"`
Head string `yaml:"head,omitempty" json:"head,omitempty"`
}
TriggerPlanRef references a profile by name.
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.