config

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFileNames = []string{"taskctl.yaml", "tasks.yaml"}

DefaultFileNames is default names for tasks' files

View Source
var ErrConfigNotFound = errors.New("config file not found")

Functions

This section is empty.

Types

type Config

type Config struct {
	Import    []string
	Contexts  map[string]*runner.ExecutionContext
	Pipelines map[string]*scheduler.ExecutionGraph
	Tasks     map[string]*task.Task
	Watchers  map[string]*watch.Watcher

	Debug, DryRun bool
	Output        string

	Variables variables.Container
}

Config is a taskctl internal config structure

func NewConfig

func NewConfig() *Config

NewConfig creates new config instance

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

reads config files and loads config

func NewConfigLoader

func NewConfigLoader() Loader

config loader constructor

func (*Loader) Load

func (cl *Loader) Load(file string) (*Config, error)

func (*Loader) LoadGlobalConfig

func (cl *Loader) LoadGlobalConfig() (*Config, error)

type StageDefinition

type StageDefinition struct {
	Name         string
	Condition    string
	Task         string
	Pipeline     string
	DependsOn    []string `mapstructure:"depends_on"`
	AllowFailure bool     `mapstructure:"allow_failure"`
	Dir          string
	Env          map[string]string
	Variables    map[string]string
}

type TaskDefinition

type TaskDefinition struct {
	Name         string
	Description  string
	Condition    string
	Command      []string
	After        []string
	Context      string
	Variations   []map[string]string `yaml:",omitempty"`
	Dir          string
	Timeout      *time.Duration `yaml:",omitempty"`
	AllowFailure bool           `mapstructure:"allow_failure"`
	Interactive  bool
	ExportAs     string
	Env          map[string]string
	Variables    map[string]string
}

type WatcherDefinition

type WatcherDefinition struct {
	Events    []string
	Watch     []string
	Exclude   []string
	Task      string
	Variables map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL