engine

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2016 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// name of the build agent container.
	DefaultAgent = "drone/drone-exec:latest"

	// default name of the build agent executable
	DefaultEntrypoint = []string{"/bin/drone-exec"}

	// default argument to invoke build steps
	DefaultBuildArgs = []string{"--pull", "--cache", "--clone", "--build", "--deploy"}

	// default argument to invoke build steps
	DefaultPullRequestArgs = []string{"--pull", "--cache", "--clone", "--build"}

	// default arguments to invoke notify steps
	DefaultNotifyArgs = []string{"--pull", "--notify"}
)

Functions

func ToContext added in v0.4.2

func ToContext(c Setter, engine Engine)

ToContext adds the Engine to this context if it supports the Setter interface.

Types

type Engine

type Engine interface {
	Schedule(context.Context, *Task)
	Cancel(int64, int64, *model.Node) error
	Stream(int64, int64, *model.Node) (io.ReadCloser, error)
	Deallocate(*model.Node)
	Allocate(*model.Node) error
	Subscribe(chan *Event)
	Unsubscribe(chan *Event)
}

func FromContext added in v0.4.2

func FromContext(c context.Context) Engine

FromContext returns the Engine associated with this context.

func Load

func Load(s store.Store) Engine

Load creates a new build engine, loaded with registered nodes from the database. The registered nodes are added to the pool of nodes to immediately start accepting workloads.

type Event

type Event struct {
	Name string
	Msg  []byte
}

type Setter added in v0.4.2

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

type Task

type Task struct {
	User      *model.User   `json:"-"`
	Repo      *model.Repo   `json:"repo"`
	Build     *model.Build  `json:"build"`
	BuildPrev *model.Build  `json:"build_last"`
	Jobs      []*model.Job  `json:"-"`
	Job       *model.Job    `json:"job"`
	Keys      *model.Key    `json:"keys"`
	Netrc     *model.Netrc  `json:"netrc"`
	Config    string        `json:"config"`
	Secret    string        `json:"secret"`
	System    *model.System `json:"system"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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