builder

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2014 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SkipPush bool

SkipPush, when set to true, will 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.

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(logger *logrus.Logger, shouldBeRegular bool) (*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) Build

func (bob *Builder) Build(commandSequence *parser.CommandSequence) error

Build does the building!

func (*Builder) BuildFromFile

func (bob *Builder) BuildFromFile(file string) error

BuildFromFile combines Build() with parser.Parse() to reduce the number of steps needed to build with bob programatically.

func (*Builder) CleanWorkdir

func (bob *Builder) CleanWorkdir() error

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) Repodir

func (bob *Builder) Repodir() string

Repodir is the dir from which we are using files for our docker builds.

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.

func (*Builder) Setup

func (bob *Builder) Setup() error

Setup moves all of the correct files into place in the temporary directory in order to perform the docker build.

func (*Builder) Workdir

func (bob *Builder) Workdir() string

Workdir returns bob's working directory.

Jump to

Keyboard shortcuts

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