Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PipelineDef ¶
type PipelineDef struct {
// Concurrency declares how many instances of this pipeline are allowed to execute concurrently (defaults to 1)
Concurrency int `yaml:"concurrency"`
// QueueLimit is the number of slots for queueing jobs if the allowed concurrency is exceeded, defaults to unbounded (nil)
QueueLimit *int `yaml:"queue_limit"`
// QueueStrategy to use when adding jobs to the queue (defaults to append)
QueueStrategy QueueStrategy `yaml:"queue_strategy"`
// ContinueRunningTasksAfterFailure should be set to true if you want to continue working through all jobs whose
// predecessors have not failed. false by default; so by default, if the first job aborts, all others are terminated as well.
ContinueRunningTasksAfterFailure bool `yaml:"continue_running_tasks_after_failure"`
RetentionPeriodHours int `yaml:"retention_period_hours"`
RetentionCount int `yaml:"retention_count"`
Tasks map[string]TaskDef `yaml:"tasks"`
// SourcePath stores the source path where the pipeline was defined
SourcePath string
}
type PipelinesDef ¶
type PipelinesDef struct {
Pipelines PipelinesMap `yaml:"pipelines"`
}
func LoadRecursively ¶
func LoadRecursively(pattern string) (*PipelinesDef, error)
func (*PipelinesDef) Load ¶
func (d *PipelinesDef) Load(path string) error
type PipelinesMap ¶
type PipelinesMap map[string]PipelineDef
func (PipelinesMap) NamesWithSourcePath ¶
func (m PipelinesMap) NamesWithSourcePath() KeyValue
type QueueStrategy ¶
type QueueStrategy int
const ( // QueueStrategyAppend appends jobs to the queue until queue limit is reached QueueStrategyAppend QueueStrategy = 0 // QueueStrategyReplace replaces pending jobs (with same variables) instead of appending to the queue QueueStrategyReplace QueueStrategy = 1 )
func (*QueueStrategy) UnmarshalYAML ¶
func (s *QueueStrategy) UnmarshalYAML(unmarshal func(interface{}) error) error
type TaskDef ¶
type TaskDef struct {
// Script is a list of shell commands that are executed for this task
Script []string `yaml:"script"`
// DependsOn is a list of task names this task depends on (must be finished before it can start)
DependsOn []string `yaml:"depends_on"`
// AllowFailure should be set, if the pipeline should continue event if this task had an error
AllowFailure bool `yaml:"allow_failure"`
}
Click to show internal directories.
Click to hide internal directories.