plugin

package
v0.0.0-...-d6109f6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2016 License: Apache-2.0 Imports: 5 Imported by: 82

Documentation

Index

Constants

View Source
const (
	StatePending = "pending"
	StateRunning = "running"
	StateSuccess = "success"
	StateFailure = "failure"
	StateKilled  = "killed"
	StateError   = "error"
)
View Source
const (
	EventPush   = "push"
	EventPull   = "pull_request"
	EventTag    = "tag"
	EventDeploy = "deploy"
)

Variables

This section is empty.

Functions

func MustParse

func MustParse()

MustParse parses parameter definitions from the map and panics if there is a parsing error.

func MustUnmarshal

func MustUnmarshal(v interface{}) error

Unmarshal parses the JSON payload from the command arguments and unmarshal into a value pointed to by v.

func Param

func Param(name string, value interface{})

Param defines a parameter with the specified name.

func Parse

func Parse() error

Parse parses parameter definitions from the map.

func Unmarshal

func Unmarshal(v interface{}) error

Unmarshal parses the JSON payload from the command arguments and unmarshal into a value pointed to by v.

Types

type Build

type Build struct {
	Number    int    `json:"number"`
	Event     string `json:"event"`
	Status    string `json:"status"`
	Enqueued  int64  `json:"enqueued_at"`
	Created   int64  `json:"created_at"`
	Started   int64  `json:"started_at"`
	Finished  int64  `json:"finished_at"`
	Deploy    string `json:"deploy_to"`
	Commit    string `json:"commit"`
	Branch    string `json:"branch"`
	Ref       string `json:"ref"`
	Refspec   string `json:"refspec"`
	Remote    string `json:"remote"`
	Title     string `json:"title"`
	Message   string `json:"message"`
	Timestamp int64  `json:"timestamp"`
	Author    string `json:"author"`
	Avatar    string `json:"author_avatar"`
	Email     string `json:"author_email"`
	Link      string `json:"link_url"`
}

Build represents the process of compiling and testing a changeset, typically triggered by the remote system (ie GitHub).

type Job

type Job struct {
	ID       int64  `json:"id"`
	Number   int    `json:"number"`
	Status   string `json:"status"`
	ExitCode int    `json:"exit_code"`
	Enqueued int64  `json:"enqueued_at"`
	Started  int64  `json:"started_at"`
	Finished int64  `json:"finished_at"`

	Environment map[string]string `json:"environment"`
}

Job represents a single job that is being executed as part of a Build.

type Keypair

type Keypair struct {
	Public  string `json:"public"`
	Private string `json:"private"`
}

Keypair represents an RSA public and private key assigned to a repository. It may be used to clone private repositories, or as a deployment key.

type Netrc

type Netrc struct {
	Machine  string `json:"machine"`
	Login    string `json:"login"`
	Password string `json:"user"`
}

Netrc defines a default .netrc file that should be injected into the build environment. It will be used to authorize access to https resources, such as git+https clones.

type ParamSet

type ParamSet struct {
	// contains filtered or unexported fields
}
var Stdin *ParamSet

func NewParamSet

func NewParamSet(reader io.Reader) *ParamSet

func (ParamSet) Param

func (p ParamSet) Param(name string, value interface{})

Param defines a parameter with the specified name.

func (ParamSet) Parse

func (p ParamSet) Parse() error

Parse parses parameter definitions from the map.

func (ParamSet) Unmarshal

func (p ParamSet) Unmarshal(v interface{}) error

Unmarshal parses the JSON payload from the command arguments and unmarshal into a value pointed to by v.

type Repo

type Repo struct {
	Kind        string `json:"scm"`
	Owner       string `json:"owner"`
	Name        string `json:"name"`
	FullName    string `json:"full_name"`
	Avatar      string `json:"avatar_url"`
	Link        string `json:"link_url"`
	Clone       string `json:"clone_url"`
	Branch      string `json:"default_branch"`
	Timeout     int64  `json:"timeout"`
	IsPrivate   bool   `json:"private"`
	IsTrusted   bool   `json:"trusted"`
	AllowPull   bool   `json:"allow_pr"`
	AllowPush   bool   `json:"allow_push"`
	AllowDeploy bool   `json:"allow_deploys"`
	AllowTag    bool   `json:"allow_tags"`
}

Repo represents a version control repository.

type System

type System struct {
	Version   string   `json:"version"`
	Link      string   `json:"link_url"`
	Plugins   []string `json:"plugins"`
	Globals   []string `json:"globals"`
	Escalates []string `json:"privileged_plugins"`
}

System provides important information about the Drone server to the plugin.

type Workspace

type Workspace struct {
	Root string `json:"root"`
	Path string `json:"path"`

	Netrc *Netrc   `json:"netrc"`
	Keys  *Keypair `json:"keys"`
}

Workspace defines the build's workspace inside the container. This helps the plugin locate the source code directory.

Jump to

Keyboard shortcuts

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