Documentation ¶
Index ¶
- func CreateHostWorkspace(workdir string) func(*engine.Spec)
- func CreateWorkspace(spec *engine.Spec)
- func DindFunc(images []string) func(*yaml.Container) bool
- func MountHostWorkspace(step *engine.Step, base, path, full string)
- func MountWorkspace(step *engine.Step, base, path, full string)
- func SkipFunc(data SkipData) func(*yaml.Container) bool
- type Compiler
- type SkipData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHostWorkspace ¶
CreateHostWorkspace returns a WorkspaceFunc that mounts a host machine volume as the pipeline workspace.
func CreateWorkspace ¶
CreateWorkspace creates the workspace volume as an empty directory mount.
func DindFunc ¶
DindFunc is a helper function that returns true if a container image (specifically a plugin) is a whitelisted dind container and should be executed in privileged mode.
func MountHostWorkspace ¶
MountHostWorkspace is a WorkspaceFunc that mounts the default workspace and host volume to the pipeline.
func MountWorkspace ¶
MountWorkspace is a WorkspaceFunc that mounts the default workspace volume to the pipeline step.
Types ¶
type Compiler ¶
type Compiler struct { // GitCredentialsFunc returns a .git-credentials file // that can be used by the default clone step to // authenticate to the remote repository. GitCredentialsFunc func() []byte // NetrcFunc returns a .netrc file that can be used by // the default clone step to authenticate to the remote // repository. NetrcFunc func() []byte // PrivilegedFunc returns true if the container should // be started in privileged mode. The intended use is // for plugins that run Docker-in-Docker. This will be // deprecated in a future release. PrivilegedFunc func(*yaml.Container) bool // SkipFunc returns true if the step should be skipped. // The skip function can be used to evaluate the when // clause of each step, and return true if it should // be skipped. SkipFunc func(*yaml.Container) bool // TransformFunc can be used to modify the compiled // output prior to completion. This can be useful when // you need to programatically modify the output, // set defaults, etc. TransformFunc func(*engine.Spec) // WorkspaceFunc can be used to set the workspace volume // that is created for the entire pipeline. The primary // use case for this function is running local builds, // where the workspace is mounted to the host machine // working directory. WorkspaceFunc func(*engine.Spec) // WorkspaceMountFunc can be used to override the default // workspace volume mount. WorkspaceMountFunc func(step *engine.Step, base, path, full string) }
A Compiler compiles the pipeline configuration to an intermediate representation that can be executed by the Drone runtime engine.