build

package module
Version: 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL