Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CloneOpts ¶
type CloneOpts struct {
Skip bool `yaml:"skip"`
Depth int `yaml:"depth"`
IncludeSubmodules bool `yaml:"submodules"`
}
func (CloneOpts) AsRecord ¶
func (c CloneOpts) AsRecord() tangled.Pipeline_CloneOpts
type Compiler ¶
type Compiler struct {
Trigger tangled.Pipeline_TriggerMetadata
Diagnostics Diagnostics
}
func (*Compiler) Compile ¶
convert a repositories' workflow files into a fully compiled pipeline that runners accept
func (*Compiler) Parse ¶
func (compiler *Compiler) Parse(p RawPipeline) Pipeline
type Constraint ¶
type Constraint struct {
Event StringList `yaml:"event"`
Branch StringList `yaml:"branch"` // this is optional, and only applied on "push" events
}
func (*Constraint) Match ¶
func (c *Constraint) Match(trigger tangled.Pipeline_TriggerMetadata) bool
func (*Constraint) MatchBranch ¶
func (c *Constraint) MatchBranch(branch string) bool
func (*Constraint) MatchEvent ¶
func (c *Constraint) MatchEvent(event string) bool
func (*Constraint) MatchRef ¶
func (c *Constraint) MatchRef(ref string) bool
type Diagnostics ¶
func (*Diagnostics) AddError ¶
func (d *Diagnostics) AddError(path string, err error)
func (*Diagnostics) AddWarning ¶
func (d *Diagnostics) AddWarning(path string, kind WarningKind, reason string)
func (*Diagnostics) Combine ¶
func (d *Diagnostics) Combine(o Diagnostics)
func (*Diagnostics) IsEmpty ¶
func (d *Diagnostics) IsEmpty() bool
func (Diagnostics) IsErr ¶
func (d Diagnostics) IsErr() bool
type Error ¶
type RawPipeline ¶
type RawPipeline = []RawWorkflow
type StringList ¶
type StringList []string
func (*StringList) UnmarshalYAML ¶
func (s *StringList) UnmarshalYAML(unmarshal func(any) error) error
Custom unmarshaller for StringList
type TriggerKind ¶
type TriggerKind string
const ( WorkflowDir = ".tangled/workflows" TriggerKindPush TriggerKind = "push" TriggerKindPullRequest TriggerKind = "pull_request" TriggerKindManual TriggerKind = "manual" )
func (TriggerKind) String ¶
func (t TriggerKind) String() string
type Warning ¶
type Warning struct {
Path string
Type WarningKind
Reason string
}
type WarningKind ¶
type WarningKind string
var ( WorkflowSkipped WarningKind = "workflow skipped" InvalidConfiguration WarningKind = "invalid configuration" )
type Workflow ¶
type Workflow struct {
Name string `yaml:"-"` // name of the workflow file
Engine string `yaml:"engine"`
When []Constraint `yaml:"when"`
CloneOpts CloneOpts `yaml:"clone"`
Raw string `yaml:"-"`
}
this is simply a structural representation of the workflow file
func (*Workflow) Match ¶
func (w *Workflow) Match(trigger tangled.Pipeline_TriggerMetadata) bool
if any of the constraints on a workflow is true, return true
Source Files
¶
- compile.go
- def.go
Click to show internal directories.
Click to hide internal directories.