build

package module
v0.0.0-...-dda1707 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: MIT Imports: 18 Imported by: 0

README ΒΆ

πŸ“ go-build GoDoc Build Status codecov

This is an isolated version of the old build package I wrote for Inertia, a command-line application that enables easy, self-hosted continuous deployment. It provides a Golang API for executing Dockerfile, docker-compose, and Herokuish builds and deployments.

This package is still WIP and in the process of being cleaned up, but the bulk of the code has been in active use in Inertiad for a while - see package inertiad/build.

Documentation ΒΆ

Overview ΒΆ

Package build provides Golang bindings for Docker, docker-compose, and Herokuish builds and deployments. It relies on Docker and some Docker images.

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

func NewDockerClient ΒΆ

func NewDockerClient() (*docker.Client, error)

NewDockerClient creates a new Docker Client from ENV values and negotiates the correct API version

Types ΒΆ

type Builder ΒΆ

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

Builder manages build tools and executes builds

func NewBuilder ΒΆ

func NewBuilder(conf BuilderConfig) *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

type BuilderConfig ΒΆ

type BuilderConfig struct {
	DockerComposeVersion string
	HerokuishVersion     string
}

BuilderConfig defines settings for Builder

type Config ΒΆ

type Config struct {
	Name string

	BuildFilePath  string
	BuildDirectory string

	EnvValues []string
}

Config contains parameters required for builds to execute

type LogOptions ΒΆ

type LogOptions struct {
	Container    string
	Stream       bool
	Detailed     bool
	NoTimestamps bool
	Entries      int
}

LogOptions is used to configure retrieved container logs

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.

Jump to

Keyboard shortcuts

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