inertia: github.com/ubclaunchpad/inertia/daemon/inertiad/build Index | Files | Directories

package build

import "github.com/ubclaunchpad/inertia/daemon/inertiad/build"

Package build implements Inertia's build procedures

Index

Package Files

builder.go doc.go output.go util.go

type Builder Uses

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

Builder manages build tools and executes builds

func NewBuilder Uses

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

NewBuilder creates a builder with given configuration

func (*Builder) Build Uses

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 Uses

func (b *Builder) GetBuildStageName() string

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

func (*Builder) Prune Uses

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

Prune cleans up Dokcer assets

func (*Builder) PruneAll Uses

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

PruneAll forcibly removes Docker assets

func (*Builder) StopContainers Uses

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

StopContainers stops containers and cleans up assets

type Config Uses

type Config struct {
    Name string

    BuildFilePath    string
    BuildDirectory   string
    PersistDirectory string

    EnvValues []string
}

Config contains parameters required for builds to execute

type ContainerBuilder Uses

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 Uses

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

PathSynopsis
mocksCode generated by counterfeiter.

Package build imports 18 packages (graph) and is imported by 3 packages. Updated 2021-01-28. Refresh now. Tools for package owners.