runner

package
v0.0.0-...-1806480 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package runner is an implementation of job runner.

Package runner is an implementation of job runner.

Index

Constants

View Source
const (
	// BindTemplate is the template of binds.
	BindTemplate = "%s:%s"

	// BuiltImage is the flag of running a container which use the built image as a service.
	BuiltImage = "BUILT_IMAGE"
)

Variables

This section is empty.

Functions

func CopyFromContainer

func CopyFromContainer(client *docker_client.Client,
	cid string, sourcefile string, dstPath string) error

CopyFromContainer copies from sourcefile in container to dstPath in host.

func CopyOutPutFiles

func CopyOutPutFiles(dockerManager *docker.Manager, cid string,
	outputs []string, outPutPath string) error

CopyOutPutFiles copy output files from container

func Encode

Encode encodes the build script as a command in the provided Container config. For linux, the build script is embedded as the container entrypoint command, base64 encoded as a one-line script.

Types

type Build

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

Build is a typed representation of a build job.

func Load

func Load(contextDir string, event *api.Event, dockerManager *docker.Manager, tree *parser.Tree) *Build

Load loads the tree to the build job.

func (Build) GetEvent

func (b Build) GetEvent() *api.Event

GetEvent returns the event.

func (*Build) IsPushImageSuccess

func (b *Build) IsPushImageSuccess() bool

IsPushImageSuccess gets if image is pushed successfully.

func (*Build) PublishImage

func (b *Build) PublishImage() (err error)

PublishImage publish image to registry.

func (*Build) RunNode

func (b *Build) RunNode(flags parser.NodeType) error

RunNode walks through the tree, run the build job.

func (*Build) Setup

func (b *Build) Setup() error

Setup environments.

func (*Build) Teardown

func (b *Build) Teardown() error

Teardown tears down the build.

type BuildStatus

type BuildStatus uint

BuildStatus represents the type for status of build.

Jump to

Keyboard shortcuts

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