Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
rs.BaseField `yaml:"-"`
// Global options only have limited rendering suffix support
Global GlobalConfig `yaml:"global"`
// Include other files using path relative to current file
// only local path is supported
//
// With path glob pattern '*' and '**' support
Include []*IncludeEntry `yaml:"include"`
// Shells for command execution
Shells []*tools.ShellTool `yaml:"shells"`
// Renderers config options
Renderers []*RendererGroup `yaml:"renderers"`
// Tools config options for registered tools
Tools Tools `yaml:"tools"`
Tasks map[string][]dukkha.Task `yaml:",inline"`
}
type GlobalConfig ¶
type GlobalConfig struct {
rs.BaseField `yaml:"-"`
// DefaultGitBranch set GIT_DEFAULT_BRANCH, useful when dukkha can not
// detect branch name of origin/HEAD (e.g. github ci environment)
//
// If your have multiple definitions of this option in different config
// file, only the first occurrence of the option is used.
DefaultGitBranch string `yaml:"default_git_branch"`
// Env add global environment variables for all working parts in dukkha
Env dukkha.Env `yaml:"env"`
// Values is the global store of runtime values
//
// accessible from renderer template `{{ values.YOUR_VAL_KEY }}`
// and renderer env/shell `${values.YOUR_VAL_KEY}`
Values rs.AnyObjectMap `yaml:"values"`
}
func (*GlobalConfig) Merge ¶
func (g *GlobalConfig) Merge(a *GlobalConfig) error
func (*GlobalConfig) ResolveAllButValues ¶
func (g *GlobalConfig) ResolveAllButValues(rc dukkha.ConfigResolvingContext) error
ResolveAllButValues resolves global env first, and make them available to all other fields, then resolves all other fields except values (will be handled later)
type IncludeEntry ¶ added in v0.7.0
type IncludeEntry struct {
rs.BaseField `yaml:",inline"`
// Path is the local path to include, can be either directory or file
//
// Path and Text are mutually exclusive
Path string `yaml:"path"`
// Text is the config text to include, usually used with rendering suffix
// to include remote config
//
// Path and Text are mutually exclusive
Text string `yaml:"text"`
}
type RendererGroup ¶ added in v0.7.0
RendererGroup contains a group of renderers can be initialized without depending on each other
Click to show internal directories.
Click to hide internal directories.