Documentation ¶
Index ¶
- func NewExecutor(ctx context.Context, name string, log *logger.Logger, ...) (executor.Executor, error)
- func ResetPulls()
- type BuildConfig
- type BuildResult
- type Builder
- func (b *Builder) AddVerb(name string, vd *verbDefinition)
- func (b *Builder) Close() error
- func (b *Builder) FileName() string
- func (b *Builder) ImageID() string
- func (b *Builder) Mrb() *mruby.Mrb
- func (b *Builder) Result() BuildResult
- func (b *Builder) Run() BuildResult
- func (b *Builder) RunCode(val *mruby.MrbValue, stackKeep int) (BuildResult, int)
- func (b *Builder) RunScript(script string) BuildResult
- func (b *Builder) SetContext(ctx context.Context)
- func (b *Builder) Tag(name string) error
- func (b *Builder) Wait() BuildResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutor ¶
func NewExecutor(ctx context.Context, name string, log *logger.Logger, showRun, useCache, tty bool) (executor.Executor, error)
NewExecutor returns a valid executor for the given name, or error.
func ResetPulls ¶ added in v0.4.2
func ResetPulls()
ResetPulls is a function to facilitate testing of the coordinated pull functionality.
Types ¶
type BuildConfig ¶ added in v0.4.1
type BuildConfig struct { Cache bool TTY bool // controls terminal codes ShowRun bool OmitFuncs []string Context context.Context Runner chan struct{} FileName string Logger *logger.Logger }
BuildConfig is a struct containing the configuration for the builder.
type BuildResult ¶ added in v0.4.1
BuildResult is an encapsulated tuple of *mruby.MrbValue and error used for communicating... build results.
type Builder ¶
type Builder struct { Logger *logger.Logger // public so its output can be tested // contains filtered or unexported fields }
Builder implements the builder core.
func NewBuilder ¶
func NewBuilder(bc BuildConfig) (*Builder, error)
NewBuilder creates a new builder. Returns error on docker or mruby issues.
func (*Builder) AddVerb ¶
AddVerb adds a function to the mruby dispatch as well as adding hooks around the call to ensure containers are committed and intermediate layers are cleared.
func (*Builder) ImageID ¶
ImageID returns the latest known Image identifier that we committed. At the end of the run this will be the golden docker image.
func (*Builder) Result ¶ added in v0.4.1
func (b *Builder) Result() BuildResult
Result returns the latest cached result from any run invocation. The behavior is undefined if called before any Run()-style invocation.
func (*Builder) Run ¶
func (b *Builder) Run() BuildResult
Run runs the script set by the BuildConfig. It closes the run channel when it finishes.
func (*Builder) RunCode ¶ added in v0.3.3
RunCode runs the ruby value (a proc) and returns the result. It does not close the run channel.
func (*Builder) RunScript ¶ added in v0.4.1
func (b *Builder) RunScript(script string) BuildResult
RunScript runs the provided script. It does not close the run channel.
func (*Builder) SetContext ¶ added in v0.4.1
SetContext sets the execution context.
func (*Builder) Wait ¶ added in v0.4.1
func (b *Builder) Wait() BuildResult
Wait waits for the build to complete.