Documentation
¶
Index ¶
- func WithJobLogger(ctx context.Context, jobName string) context.Context
- type Config
- type ExpressionEvaluator
- type RunContext
- func (rc *RunContext) Close(ctx context.Context) error
- func (rc *RunContext) EvalBool(expr string) bool
- func (rc *RunContext) Executor() common.Executor
- func (rc *RunContext) GetEnv() map[string]string
- func (rc *RunContext) NewExpressionEvaluator() ExpressionEvaluator
- func (rc *RunContext) NewStepExpressionEvaluator(step *model.Step) ExpressionEvaluator
- func (rc *RunContext) StepEnv(step *model.Step) map[string]string
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Workdir string // path to working directory EventName string // name of event to run EventPath string // path to JSON file to use for event.json in containers ReuseContainers bool // reuse containers to maintain state ForcePull bool // force pulling of the image, if already present LogOutput bool // log the output from docker run Secrets map[string]string // list of secrets }
Config contains the config for a new runner
type ExpressionEvaluator ¶
ExpressionEvaluator is the interface for evaluating expressions
type RunContext ¶
type RunContext struct { Config *Config Matrix map[string]interface{} Run *model.Run EventJSON string Env map[string]string Tempdir string ExtraPath []string CurrentStep string StepResults map[string]*stepResult ExprEval ExpressionEvaluator }
RunContext contains info about current job
func (*RunContext) Close ¶
func (rc *RunContext) Close(ctx context.Context) error
Close cleans up temp dir
func (*RunContext) EvalBool ¶
func (rc *RunContext) EvalBool(expr string) bool
EvalBool evaluates an expression against current run context
func (*RunContext) Executor ¶
func (rc *RunContext) Executor() common.Executor
Executor returns a pipeline executor for all the steps in the job
func (*RunContext) GetEnv ¶
func (rc *RunContext) GetEnv() map[string]string
GetEnv returns the env for the context
func (*RunContext) NewExpressionEvaluator ¶
func (rc *RunContext) NewExpressionEvaluator() ExpressionEvaluator
NewExpressionEvaluator creates a new evaluator
func (*RunContext) NewStepExpressionEvaluator ¶
func (rc *RunContext) NewStepExpressionEvaluator(step *model.Step) ExpressionEvaluator
NewStepExpressionEvaluator creates a new evaluator
Click to show internal directories.
Click to hide internal directories.