build

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 18 Imported by: 3

Documentation

Overview

Package build implements Inertia's build procedures

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder manages build tools and executes builds

func NewBuilder

func NewBuilder(conf cfg.Config, stopper containers.ContainerStopper) *Builder

NewBuilder creates a builder with given configuration

func (*Builder) Build

func (b *Builder) Build(buildType string, d Config,
	cli *docker.Client, out io.Writer) (func() error, error)

Build executes build and deploy

func (*Builder) GetBuildStageName

func (b *Builder) GetBuildStageName() string

GetBuildStageName returns the name of the intermediary container used to build projects

func (*Builder) Prune added in v0.4.1

func (b *Builder) Prune(docker *docker.Client, out io.Writer) error

Prune cleans up Dokcer assets

func (*Builder) PruneAll added in v0.4.1

func (b *Builder) PruneAll(docker *docker.Client, out io.Writer) error

PruneAll forcibly removes Docker assets

func (*Builder) StopContainers added in v0.4.1

func (b *Builder) StopContainers(docker *docker.Client, out io.Writer) error

StopContainers stops containers and cleans up assets

type Config

type Config struct {
	Name string

	BuildFilePath    string
	BuildDirectory   string
	PersistDirectory string

	EnvValues []string
}

Config contains parameters required for builds to execute

type ContainerBuilder added in v0.5.0

type ContainerBuilder interface {
	Build(string, Config, *docker.Client, io.Writer) (func() error, error)
	GetBuildStageName() string
	StopContainers(*docker.Client, io.Writer) error
	Prune(*docker.Client, io.Writer) error
	PruneAll(*docker.Client, io.Writer) error
}

ContainerBuilder builds projects and returns a callback that can be used to deploy the project. No relation to Bob the Builder, though a Bob did write this.

type ProjectBuilder

type ProjectBuilder func(Config, *docker.Client, io.Writer) (func() error, error)

ProjectBuilder builds projects and returns a callback that can be used to deploy the project. No relation to Bob the Builder, though a Bob did write this.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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