build

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2017 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildFile = "build.yml"
)
View Source
const CmdHeader = `#!/bin/sh
set -o errexit

`

Variables

This section is empty.

Functions

func CreateBuildEntries

func CreateBuildEntries(changes git.Files) []string

func Name

func Name(buildFile string) string

func Start

func Start(buildName string, config *Build) error

Types

type Build

type Build struct {
	Docker DockerBuild `yaml:"docker"`
}

func ParseManifest

func ParseManifest(buildFile string) *Build

type DockerBuild

type DockerBuild struct {
	Run   *DockerRunBuild   `yaml:"run"`
	Build *DockerImageBuild `yaml:"build"`
}

type DockerBuildError

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

func (*DockerBuildError) Error

func (db *DockerBuildError) Error() string

type DockerImageBuild

type DockerImageBuild struct {
	File  string                      `yaml:"file"`
	Root  string                      `yaml:"root"`
	Tags  []string                    `yaml:"tags"`
	Auths map[string]types.AuthConfig `yam:"auths"`
	Push  *DockerPush                 `yaml:"push"`
}

func (*DockerImageBuild) CreateBuildContext

func (b *DockerImageBuild) CreateBuildContext() (io.Reader, error)

func (*DockerImageBuild) ToBuildOptions

func (b *DockerImageBuild) ToBuildOptions() types.ImageBuildOptions

type DockerPush

type DockerPush struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Email    string `yaml:"email"`
	Registry string `yaml:"registry"`
}

type DockerRunBuild

type DockerRunBuild struct {
	Image    string           `yaml:"image"`
	Steps    string           `yaml:"steps"`
	Workdir  string           `yaml:"workdir"`
	Env      []string         `yaml:"env"`
	Volumes  []string         `yaml:"volumes"`
	Services []DockerServices `yaml:"services"`
}

func (*DockerRunBuild) DockerCmdToShellScript

func (b *DockerRunBuild) DockerCmdToShellScript() (tmpFileCleanFunc, error)

func (*DockerRunBuild) ToDockerClientConfig

func (*DockerRunBuild) ToDockerContainerConfig

func (b *DockerRunBuild) ToDockerContainerConfig() *container.Config

func (*DockerRunBuild) ToDockerHostConfig

func (b *DockerRunBuild) ToDockerHostConfig() (*container.HostConfig, error)

func (*DockerRunBuild) ToDockerNetworkingConfig

func (b *DockerRunBuild) ToDockerNetworkingConfig() *network.NetworkingConfig

type DockerRunError

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

func (*DockerRunError) Error

func (dr *DockerRunError) Error() string

type DockerServices

type DockerServices struct {
	Image string `yaml:"image"`
	Name  string `yaml:"name"`
}

type RunnerCli

type RunnerCli struct {
	Cli    *client.Client
	Name   string
	Config *Build
}

func (*RunnerCli) PushDockerImage

func (rc *RunnerCli) PushDockerImage(err error) error

func (*RunnerCli) Start

func (rc *RunnerCli) Start() error

func (*RunnerCli) StartDockerBuild

func (rc *RunnerCli) StartDockerBuild() error

func (*RunnerCli) StartDockerRun

func (rc *RunnerCli) StartDockerRun() error

Jump to

Keyboard shortcuts

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