Documentation ¶
Index ¶
- Constants
- Variables
- func CreateStepContainer(ctx context.Context, client *docker.Client, opts CreateStepContainerOpts) (*docker.Container, error)
- func DefaultMounts(v *docker.Volume) ([]docker.HostMount, error)
- func GetVolumeValue(args *plumbing.PipelineArgs, arg pipeline.Argument) (string, error)
- func MountAt(v *docker.Volume, target string, mode int) docker.HostMount
- func RunContainer(ctx context.Context, client *docker.Client, opts RunOpts) error
- type Client
- type CreateStepContainerOpts
- type RunOpts
Constants ¶
View Source
const ScribeContainerPath = "/var/scribe"
Variables ¶
View Source
var KnownVolumes = map[pipeline.Argument]func(*plumbing.PipelineArgs) (string, error){ pipeline.ArgumentSourceFS: func(args *plumbing.PipelineArgs) (string, error) { return ".", nil }, pipeline.ArgumentDockerSocketFS: func(*plumbing.PipelineArgs) (string, error) { return "/var/run/docker.sock", nil }, }
KnownVolumes is a map of default argument to a function used to retrieve the volume the value represents. For example, we know that every pipeline is ran alongisde source code. The user can supply a "-arg=source={path-to-source}" argument, or we can just
Functions ¶
func CreateStepContainer ¶
func GetVolumeValue ¶
GetVolumeValue will attempt to find the appropriate volume to mount based on the argument provided. Some arguments have known or knowable values, like "ArgumentSourceFS".
Types ¶
type Client ¶
The Client is used when interacting with a scribe pipeline using the scribe CLI. In order to emulate what happens in a remote environment, the steps are put into a queue before being ran. Each step is ran in its own docker container.
type CreateStepContainerOpts ¶
Click to show internal directories.
Click to hide internal directories.