Documentation
¶
Index ¶
- Constants
- Variables
- func AutoProtectValues(key string, original string, decoded string)
- func GetCIDEnvironment(configEnv map[string]string, projectDirectory string) (map[string]string, error)
- func RegisterBuiltinAction(action ActionStep)
- type ActionDetails
- type ActionExecutionContext
- type ActionStep
- type CoverageReport
- type MissingRequirement
Constants ¶
View Source
const DefaultParallelization = 10
Variables ¶
View Source
var BuiltinActions = make(map[string]ActionStep)
Functions ¶
func AutoProtectValues ¶
func GetCIDEnvironment ¶
func GetCIDEnvironment(configEnv map[string]string, projectDirectory string) (map[string]string, error)
GetCIDEnvironment returns the normalized ci variables
func RegisterBuiltinAction ¶
func RegisterBuiltinAction(action ActionStep)
RegisterBuiltinAction registers a builtin action
Types ¶
type ActionDetails ¶
type ActionDetails struct {
Name string
Version string
UsedTools []string
ToolDependencies map[string]string
}
ActionDetails holds details about the action
type ActionExecutionContext ¶
type ActionExecutionContext struct {
Paths config.PathConfig // Paths holds the path configuration
ProjectDir string // ProjectDir holds the project directory
WorkDir string // WorkDir holds the current working directory
NCI nci.Spec // NCI contains the NCI spec
Config interface{} // Config holds the json configuration passed to this action
Args []string // Args holds the arguments passed to the action
Env map[string]string // Env contains the full environment
ActionEnv map[string]string // ActionEnv contains the environment that is visible to the action
Parallelization int // Parallelization defines how many tasks can be run in parallel inside an action
CurrentUser user.User // CurrentUser holds information about the user running this process
Modules []*analyzerapi.ProjectModule // Modules contains the project modules
CurrentModule *analyzerapi.ProjectModule // CurrentModule contains the module that is currently being build
}
ActionExecutionContext holds runtime information for the actions
func GetActionContext ¶
func GetActionContext(modules []*analyzerapi.ProjectModule, projectDir string, env map[string]string, access catalog.ActionAccess) ActionExecutionContext
GetActionContext gets the action context, this operation is expensive and should only be called once per execution
type ActionStep ¶
type ActionStep interface {
// GetDetails retrieves information about the action
GetDetails(ctx *ActionExecutionContext) ActionDetails
// Execute runs the action
Execute(ctx *ActionExecutionContext, localState *state.ActionStateContext) error
}
ActionStep is the interface that needs to be implemented by all builtin actions
type CoverageReport ¶
CoverageReport contains a generic coverage report
type MissingRequirement ¶
type MissingRequirement struct {
Message string
}
MissingRequirement contains a record about a missing requirement for a action
Click to show internal directories.
Click to hide internal directories.