Documentation ¶
Index ¶
- Constants
- Variables
- func Cache(n Node, dir string) error
- func Debug(n Node, debug bool) error
- func DefaultNotifyFilter(n Node) error
- func Escalate(n Node) error
- func HttpProxy(n Node) error
- func ImageMatch(n Node, patterns []string) error
- func ImageName(n Node) error
- func ImagePull(n Node, pull bool) error
- func Mount(n Node, from, to string) error
- func Sanitize(n Node) error
- func StorageDriver(n Node, storageDriver string) error
- type DockerNode
- type FilterNode
- type ListNode
- type Node
- type NodeType
- type RuleFunc
- type Tree
Constants ¶
const ( DefaultCloner = "plugins/drone-git" // Default clone plugin. DefaultCacher = "plugins/drone-cache" // Default cache plugin. DefaultMatch = "plugins/*" // Default plugin whitelist. )
Variables ¶
var ( ErrImageMissing = errors.New("Yaml must specify an image for every step") ErrImageWhitelist = errors.New("Yaml must specify am image from the white-list") )
Functions ¶
func Debug ¶
Debug transforms plugin Nodes to set the DEBUG environment variable when starting plugins.
func DefaultNotifyFilter ¶
func Escalate ¶
Escalate escalates a Docker Node to run in privileged mode if the plugin is whitelisted.
func HttpProxy ¶
HttpProxy injects the HTTP_PROXY and HTTPS_PROXY environment variables into the container.
func ImageMatch ¶
ImageMatch checks the image name against a whitelist.
func ImageName ¶
ImageName expands to a fully qualified image name. If no image name is found, a default is used when possible, else ErrImageMissing is returned.
func Sanitize ¶
Sanitize sanitizes a Docker Node by removing any potentially harmful configuration options.
func StorageDriver ¶
Types ¶
type DockerNode ¶
type DockerNode struct { NodeType Image string Pull bool Privileged bool Environment []string Entrypoint []string Command []string Commands []string Volumes []string Devices []string ExtraHosts []string Net string DNS []string AuthConfig yaml.AuthConfig Memory int64 CPUSetCPUs string OomKillDisable bool Vargs map[string]interface{} }
DockerNode represents a Docker container that should be launched as part of the build process.
type FilterNode ¶
type FilterNode struct { NodeType Repo string Branch []string Event []string Success string Failure string Change string Matrix map[string]string Environment []string Node Node // Node to execution if conditions met }
FilterNode represents a conditional step used to filter nodes. If conditions are met the child node is executed.
type RuleFunc ¶
RuleFunc defines a function used to validate or modify the yaml during the parsing process.