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"` // StartDelay will delay the start of a job if the value is greater than zero (defaults to 0) StartDelay time.Duration `yaml:"start_delay"` // 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"` RetentionPeriod time.Duration `yaml:"retention_period"` RetentionCount int `yaml:"retention_count"` // Env sets/overrides environment variables for all tasks (takes precedence over process environment) Env map[string]string `yaml:"env"` Tasks map[string]TaskDef `yaml:"tasks"` // SourcePath stores the source path where the pipeline was defined SourcePath string }
func (PipelineDef) Equals ¶ added in v0.8.1
func (d PipelineDef) Equals(otherDef PipelineDef) bool
type PipelinesDef ¶
type PipelinesDef struct {
Pipelines PipelinesMap `yaml:"pipelines"`
}
func LoadRecursively ¶
func LoadRecursively(pattern string) (*PipelinesDef, error)
func (PipelinesDef) Equals ¶ added in v0.8.1
func (d PipelinesDef) Equals(otherDefs PipelinesDef) bool
func (*PipelinesDef) Load ¶
func (d *PipelinesDef) Load(path string) error
func (*PipelinesDef) Validate ¶ added in v0.5.0
func (d *PipelinesDef) Validate() 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"` // Env sets/overrides environment variables for this task (takes precedence over pipeline environment) Env map[string]string `yaml:"env"` }
Click to show internal directories.
Click to hide internal directories.