script

package
Version: v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	// Image specifies the Docker Image that will be
	// used to virtualize the Build process.
	Image string

	// Name specifies a user-defined label used
	// to identify the build.
	Name string

	// Script specifies the build and test commands.
	Script []string

	// Env specifies the environment of the build.
	Env []string

	// Hosts specifies the custom IP address and
	// hostname mappings.
	Hosts []string

	// Cache lists a set of directories that should
	// persisted between builds.
	Cache []string

	// Services specifies external services, such as
	// database or messaging queues, that should be
	// linked to the build environment.
	Services []string

	Deploy        *deploy.Deploy       `yaml:"deploy,omitempty"`
	Publish       *publish.Publish     `yaml:"publish,omitempty"`
	Notifications *notify.Notification `yaml:"notify,omitempty"`

	// Git specified git-specific parameters, such as
	// the clone depth and path
	Git *git.Git `yaml:"git,omitempty"`
}

Build stores the configuration details for building, testing and deploying code.

func ParseBuild

func ParseBuild(data []byte, params map[string]string) (*Build, error)

func ParseBuildFile

func ParseBuildFile(filename string) (*Build, error)

func (*Build) Write

func (b *Build) Write(f *buildfile.Buildfile, r *repo.Repo)

Write adds all the steps to the build script, including build commands, deploy and publish commands.

func (*Build) WriteBuild

func (b *Build) WriteBuild(f *buildfile.Buildfile)

WriteBuild adds only the build steps to the build script, omitting publish and deploy steps. This is important for pull requests, where deployment would be undesirable.

type Context

type Context interface {
	Host() string
	Owner() string
	Name() string

	Branch() string
	Hash() string
	Status() string
	Message() string
	Author() string
	Gravatar() string

	Duration() int64
	HumanDuration() string
}

type Deployment

type Deployment interface {
	Write(f *buildfile.Buildfile)
}

type Notification

type Notification interface {
	Set(c Context)
}

type Publish

type Publish interface {
	Write(f *buildfile.Buildfile)
}

Source Files

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