Documentation
¶
Index ¶
Constants ¶
View Source
const (
// FileName is default manifest filename
FileName = "gilbert.yaml"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
// Condition is shell command that should be successful to run specified job
Condition string `yaml:"if,omitempty"`
// Description is job description
Description string `yaml:"description,omitempty"`
// TaskName refers to task that should be run.
TaskName string `yaml:"run,omitempty"`
// PluginName describes what plugin should handle this job.
PluginName string `yaml:"plugin,omitempty"`
// MixinName is mixin to be used by this job
MixinName string `yaml:"mixin,omitempty"`
// Delay before task start in milliseconds
Delay uint `yaml:"delay,omitempty"`
// Vars is a set of variables defined for this job.
Vars scope.Vars `yaml:"vars,omitempty"`
// Params is a set of arguments for the job.
Params map[string]interface{} `yaml:"params,omitempty"`
}
Job is a single job in task
func (*Job) FormatDescription ¶ added in v0.3.0
FormatDescription returns formatted description string
func (*Job) HasDescription ¶
HasDescription checks if description is available
func (*Job) Type ¶ added in v0.3.0
func (j *Job) Type() JobExecType
Type returns job execution type
If job has no 'plugin', 'task' or 'plugin' declaration, ExecEmpty will be returned
type JobExecType ¶ added in v0.3.0
type JobExecType uint8
JobExecType represents job type
const ( // ExecEmpty means job has no execution type ExecEmpty JobExecType = iota // ExecPlugin means that job execute plugin ExecPlugin // ExecTask means that job runs other task ExecTask // ExecMixin means that job based on mixin ExecMixin )
type Manifest ¶
type Manifest struct {
// Version is gilbert file format version
Version string `yaml:"version"`
// Imports is list of imported presets
Imports []string `yaml:"imports,omitempty"`
// Vars is a set of global variables
Vars scope.Vars `yaml:"vars,omitempty"`
// Tasks is a set of tasks
Tasks TaskSet `yaml:"tasks,omitempty"`
// Mixins is a set of declared mixins
Mixins Mixins `yaml:"mixins,omitempty"`
// contains filtered or unexported fields
}
Manifest represents manifest file (gilbert.yaml)
func FromDirectory ¶ added in v0.2.0
FromDirectory loads gilbert.yaml from specified directory
func UnmarshalManifest ¶
UnmarshalManifest parses yaml contents into Manifest structure
type PluginConfigError ¶
PluginConfigError is plugin configuration error
func NewPluginConfigError ¶
func NewPluginConfigError(pluginName string, originalError error) *PluginConfigError
NewPluginConfigError creates a new PluginConfigError
func (*PluginConfigError) Error ¶
func (p *PluginConfigError) Error() string
Error satisfies error interface
Click to show internal directories.
Click to hide internal directories.