engine

package
v0.0.0-...-08e790f Latest Latest
Warning

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

Go to latest
Published: Mar 10, 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

This section is empty.

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 Load

func Load(env envconfig.Env, 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 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"`
}

Jump to

Keyboard shortcuts

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