Documentation
¶
Index ¶
- Variables
- type Builder
- func (bob *Builder) Build(commandSequence *parser.CommandSequence) error
- func (bob *Builder) BuildFromFile(file string) error
- func (bob *Builder) CleanWorkdir() error
- func (bob *Builder) LatestImageTaggedWithUUID(uuid string) (string, error)
- func (bob *Builder) Repodir() string
- func (bob *Builder) SetNextSubSequence(subSeq *parser.SubSequence)
- func (bob *Builder) Setup() error
- func (bob *Builder) Workdir() string
Constants ¶
This section is empty.
Variables ¶
var WaitForPush bool
WaitForPush indicates to main() that a `docker push` command has been started. Since those are run asynchronously, main() has to wait on the runner.Done channel. However, if the build does not require a push, we don't want to wait or we'll just be stuck forever.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
log.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 ¶
NewBuilder returns an instance of a Builder struct. The function exists in case we want to initialize our Builders with something.
func (*Builder) Build ¶
func (bob *Builder) Build(commandSequence *parser.CommandSequence) error
Build is currently a placeholder function but will eventually be used to do the actual work of building.
func (*Builder) BuildFromFile ¶ added in v0.2.0
BuildFromFile combines Build() with parser.Parse() to reduce the number of steps needed to build with bob programatically.
func (*Builder) CleanWorkdir ¶
CleanWorkdir effectively does a rm -rf and mkdir -p on bob's workdir. Intended to be used before using the workdir (i.e. before new command groups).
func (*Builder) LatestImageTaggedWithUUID ¶
LatestImageTaggedWithUUID accepts a uuid and invokes the underlying utility DockerClient to determine the id of the most recently created image tagged with the provided uuid.
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.