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

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

              Prune cleans up Dokcer assets

              func (*Builder) PruneAll

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

                PruneAll forcibly removes Docker assets

                func (*Builder) StopContainers

                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

                    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.