builder

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2014 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SkipPush will, when set to true, override any behavior set by a Bobfile and
	// will cause builders *NOT* to run `docker push` commands.  SkipPush is also set
	// by the `--skip-push` option when used on the command line.
	SkipPush bool
)

Functions

This section is empty.

Types

type Builder

type Builder struct {
	*logrus.Logger

	Stderr      io.Writer
	Stdout      io.Writer
	Builderfile string
	// contains filtered or unexported fields
}

A Builder is the struct that actually does the work of moving files around and executing the commands that do the docker build.

func NewBuilder

func NewBuilder(opts NewBuilderOptions) (*Builder, error)

NewBuilder returns an instance of a Builder struct. The function exists in case we want to initialize our Builders with something.

func (*Builder) BuildCommandSequence

func (bob *Builder) BuildCommandSequence(commandSequence *parser.CommandSequence) Error

BuildCommandSequence performs a build from a parser-generated CommandSequence struct

func (*Builder) SetNextSubSequence

func (bob *Builder) SetNextSubSequence(subSeq *parser.SubSequence)

SetNextSubSequence sets the next subsequence within bob to be processed. This function is exported because it is used explicitly in tests, but in Build(), it is intended to be used as a helper function.

type Error

type Error interface {
	// Error returns the error message to satisfy the error interface
	Error() string

	// ExitCode returns the code that should be used when exiting as a result
	// of this error
	ExitCode() int
}

Error is an interface for any error types returned by the builder package / during the building process

type NewBuilderOptions

type NewBuilderOptions struct {
	Logger     *logrus.Logger
	ContextDir string
	// contains filtered or unexported fields
}

NewBuilderOptions encapsulates all of the options necessary for creating a new builder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL