captain

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BuildFailed represents a build failure
	BuildFailed = 1

	// TagFailed represents a failure to tag a docker image
	TagFailed = 2

	// NonExistImage represents the existance of a docker image tag
	NonExistImage = 3

	// TestFailed represents test failure
	TestFailed = 5

	// NoGit represents lack of a git repository
	NoGit = 6

	// GitDirty represents existence of local git changes
	GitDirty = 7

	// InvalidCaptainYML represents an invalid captain.yml format
	InvalidCaptainYML = 8

	// NoDockerfiles represents lack of Dockerfile(s) on current and subdirectories.
	NoDockerfiles = 9

	// OldFormat represents old format of captain.yml
	OldFormat = 10
)

Variables

This section is empty.

Functions

func Build

func Build(config Config)

Build function compiles the Containers of the project

func Post added in v0.1.0

func Post(config Config, app App)

Post function executes commands on pre section after build

func Pre added in v0.1.0

func Pre(config Config, app App)

Pre function executes commands on pre section before build

func Pull added in v0.4.0

func Pull(config Config)

Pull function pulls the containers from the remote registry

func Push

func Push(config Config)

Push function pushes the containers to the remote registry

func RealMain

func RealMain()

RealMain is the Captain entrypoint function

func Test

func Test(config Config)

Test function executes the tests of the project

Types

type App added in v0.1.0

type App struct {
	Build string
	Image string
	Pre   []string
	Post  []string
	Test  []string
}

App struct

type Config

type Config interface {
	FilterConfig(filter string) bool
	GetApp(app string) App
	GetApps() []App
}

Config represents the information stored at captain.yml. It keeps information about images and unit tests.

func NewConfig

func NewConfig(options Options, forceOrder bool) Config

NewConfig retus a new config based on given options. Containers will be ordered so that they can be brought up and down with Docker.

type Options

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

Options that are passed by CLI are mapped here for consumption

type StatusError

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

StatusError provides error code and id

Jump to

Keyboard shortcuts

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