engine

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2015 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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