Documentation ¶
Index ¶
- Constants
- type BaseRunner
- type BuildTaskRunnerFactory
- type BuilderFactory
- type BuilderSetFactory
- type Cleanup
- type ContainerList
- type ContainerLists
- type HookFunc
- type PlanRunner
- type PlanTaskRunnerFactory
- type PushTaskRunnerFactory
- type RemoveTaskRunnerFactory
- type RunContext
- type RunTaskRunnerFactory
- type Runner
- type StageRunner
- type TaskRunner
- type TaskRunnerFactory
- type TaskRunnerFunc
Constants ¶
View Source
const ( DefaultWorkspacePath = "/workspace" ScriptPath = "/tmp/ij/script" )
View Source
const ( SSHAgentImage = "efritz/ij-ssh-agent:latest" SocketVolumePath = "/tmp/ij/ssh-agent" SocketPath = "/tmp/ij/ssh-agent/ssh-agent.sock" )
View Source
const FlashPermissionsImage = "alpine:3.8"
View Source
const PrefixMaxLength = 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRunner ¶
type BaseRunner interface { TaskRunner RegisterOnSuccess(HookFunc) RegisterOnFailure(HookFunc) }
func NewBaseRunner ¶
func NewBaseRunner( ctx context.Context, factory BuilderSetFactory, logger logging.Logger, prefix *logging.Prefix, ) BaseRunner
type BuildTaskRunnerFactory ¶
type BuildTaskRunnerFactory func( *config.BuildTask, environment.Environment, *logging.Prefix, ) TaskRunner
type BuilderFactory ¶
type BuilderSetFactory ¶
func NewMultiFactory ¶
func NewMultiFactory(factory BuilderFactory) BuilderSetFactory
type Cleanup ¶
type Cleanup struct {
// contains filtered or unexported fields
}
func NewCleanup ¶
func NewCleanup() *Cleanup
type ContainerList ¶
type ContainerList struct {
// contains filtered or unexported fields
}
func NewContainerList ¶
func NewContainerList( description string, target func(string), logger logging.Logger, ) *ContainerList
func NewContainerStopper ¶
func NewContainerStopper(logger logging.Logger) *ContainerList
func NewNetworkDisconnector ¶
func NewNetworkDisconnector(runID string, logger logging.Logger) *ContainerList
func (*ContainerList) Add ¶
func (l *ContainerList) Add(containerName string)
func (*ContainerList) Execute ¶
func (l *ContainerList) Execute()
func (*ContainerList) Remove ¶
func (l *ContainerList) Remove(containerName string)
type ContainerLists ¶
type ContainerLists struct { ContainerStopper *ContainerList NetworkDisconnector *ContainerList }
type HookFunc ¶
type HookFunc func(context *RunContext) error
type PlanRunner ¶
type PlanRunner struct {
// contains filtered or unexported fields
}
func NewPlanRunner ¶
func NewPlanRunner( ctx context.Context, config *config.Config, taskRunnerFactory TaskRunnerFactory, logger logging.Logger, env []string, ) *PlanRunner
func (*PlanRunner) IsDisabled ¶
func (r *PlanRunner) IsDisabled(context *RunContext, name string) (bool, error)
func (*PlanRunner) Run ¶
func (r *PlanRunner) Run( context *RunContext, name string, prefix *logging.Prefix, ) bool
func (*PlanRunner) ShouldRun ¶
func (r *PlanRunner) ShouldRun(context *RunContext, name string) bool
type PlanTaskRunnerFactory ¶
type PlanTaskRunnerFactory func( *config.PlanTask, environment.Environment, *logging.Prefix, ) TaskRunner
func NewPlanTaskRunnerFactory ¶
func NewPlanTaskRunnerFactory( runner *PlanRunner, logger logging.Logger, ) PlanTaskRunnerFactory
type PushTaskRunnerFactory ¶
type PushTaskRunnerFactory func( *RunContext, *config.PushTask, environment.Environment, *logging.Prefix, ) TaskRunner
func NewPushTaskRunnerFactory ¶
func NewPushTaskRunnerFactory( ctx context.Context, logger logging.Logger, ) PushTaskRunnerFactory
type RemoveTaskRunnerFactory ¶
type RemoveTaskRunnerFactory func( *RunContext, *config.RemoveTask, environment.Environment, *logging.Prefix, ) TaskRunner
func NewRemoveTaskRunnerFactory ¶
func NewRemoveTaskRunnerFactory( ctx context.Context, logger logging.Logger, ) RemoveTaskRunnerFactory
type RunContext ¶
type RunContext struct { Failure bool Environment environment.Environment // contains filtered or unexported fields }
func NewRunContext ¶
func NewRunContext(parent *RunContext) *RunContext
func (*RunContext) AddTags ¶
func (c *RunContext) AddTags(tags []string)
func (*RunContext) ExportEnv ¶
func (c *RunContext) ExportEnv(line string)
func (*RunContext) GetExportedEnv ¶
func (c *RunContext) GetExportedEnv() []string
func (*RunContext) GetTags ¶
func (c *RunContext) GetTags() []string
type RunTaskRunnerFactory ¶
type RunTaskRunnerFactory func( *config.RunTask, environment.Environment, *logging.Prefix, ) TaskRunner
func NewRunTaskRunnerFactory ¶
func NewRunTaskRunnerFactory( ctx context.Context, cfg *config.Config, runID string, scratch *scratch.ScratchSpace, containerLists *ContainerLists, containerOptions *containerOptions, logger logging.Logger, loggerFactory *logging.LoggerFactory, ) RunTaskRunnerFactory
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func SetupRunner ¶
func SetupRunner( cfg *config.Config, appOptions *options.AppOptions, runOptions *options.RunOptions, ) (runner *Runner, err error)
type StageRunner ¶
type StageRunner struct {
// contains filtered or unexported fields
}
func NewStageRunner ¶
func (*StageRunner) IsDisabled ¶
func (r *StageRunner) IsDisabled(context *RunContext) (bool, error)
func (*StageRunner) Run ¶
func (r *StageRunner) Run(context *RunContext) bool
type TaskRunner ¶
type TaskRunner interface {
Run(*RunContext) bool
}
type TaskRunnerFactory ¶
type TaskRunnerFactory func( *RunContext, config.Task, *logging.Prefix, environment.Environment, ) TaskRunner
type TaskRunnerFunc ¶
type TaskRunnerFunc func() bool
Click to show internal directories.
Click to hide internal directories.