Documentation
¶
Index ¶
- Variables
- func EnrichEnvironment(projectDirectory string, branchingConvention string, env map[string]string) error
- func FillEnvPlaceholders(input string, env map[string]string) string
- func FindProjectDir() string
- func GetCIDEnvironment(projectDirectory string) map[string]string
- func GetCacheDir(pathConfig config.PathConfig, module string) string
- func GetFullEnvironment(projectDirectory string) map[string]string
- func IsVersionStable(versionStr string) bool
- func RegisterBuiltinAction(action ActionStep)
- type ActionDetails
- type ActionExecutionContext
- type ActionStep
Constants ¶
This section is empty.
Variables ¶
View Source
var BuiltinActions = make(map[string]ActionStep)
Functions ¶
func EnrichEnvironment ¶
func EnrichEnvironment(projectDirectory string, branchingConvention string, env map[string]string) error
EnrichEnvironment enriches the environment with CID variables / release information
func FillEnvPlaceholders ¶
FillEnvPlaceholders replaces all placeholders within the string - ie. {NCI_COMMIT_COUNT}
func FindProjectDir ¶
func FindProjectDir() string
FindProjectDir finds the project directory from the current dir
func GetCIDEnvironment ¶
GetCIDEnvironment returns the normalized ci variables
func GetCacheDir ¶
func GetCacheDir(pathConfig config.PathConfig, module string) string
GetCacheDir returns the caching directory for a module
func GetFullEnvironment ¶
GetFullEnvironment returns the entire env, including host + normalized variables
func IsVersionStable ¶
IsVersionStable checks if the specified version is a stable release version (semver)
func RegisterBuiltinAction ¶
func RegisterBuiltinAction(action ActionStep)
RegisterBuiltinAction registers a builtin action
Types ¶
type ActionDetails ¶
type ActionDetails struct {
Stage string
Name string
Version string
UsedTools []string
ToolDependencies map[string]string
}
ActionDetails holds details about the action
type ActionExecutionContext ¶
type ActionExecutionContext struct {
// Paths holds the path configuration
Paths config.PathConfig
// ProjectDir holds the project directory
ProjectDir string
// WorkDir holds the current working directory
WorkDir string
// Config holds the yaml configuration passed to this action
Config string
// Args holds the arguments passed to the action
Args []string
// Env contains the normalized environment
Env map[string]string
// MachineEnv contains the full environment
MachineEnv map[string]string
}
type ActionStep ¶
type ActionStep interface {
GetDetails(ctx ActionExecutionContext) ActionDetails
Check(ctx ActionExecutionContext) bool
Execute(ctx ActionExecutionContext)
}
Normalizer is a common interface to work with all normalizers
Click to show internal directories.
Click to hide internal directories.