Documentation
¶
Index ¶
- Constants
- Variables
- func AutoProtectValues(key string, original string, decoded string)
- func DecodeEnvValue(value string) string
- func GetCIDEnvironment(configEnv map[string]string, projectDirectory string) map[string]string
- 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 DecodeEnvValue ¶
func GetCIDEnvironment ¶
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 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 json configuration passed to this action
Config string
// Args holds the arguments passed to the action
Args []string
// Env contains the environment that is visible to the action
Env map[string]string
// Parallelization defines how many tasks can be run in parallel inside an action
Parallelization int
// CurrentUser holds information about the user running this process
CurrentUser user.User
// Modules contains the project modules
Modules []*analyzerapi.ProjectModule
// CurrentModule contains the module that is currently being build
CurrentModule *analyzerapi.ProjectModule
}
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.