Documentation
¶
Index ¶
- type Auth
- type Docker
- func (e *Docker) Destroy(ctx context.Context, specv runtime.Spec) error
- func (e *Docker) Ping(ctx context.Context) error
- func (e *Docker) Run(ctx context.Context, specv runtime.Spec, stepv runtime.Step, output io.Writer) (*runtime.State, error)
- func (e *Docker) Setup(ctx context.Context, specv runtime.Spec) error
- type Network
- type Opts
- type Platform
- type PullPolicy
- type Secret
- type Spec
- type Step
- func (s *Step) Clone() runtime.Step
- func (s *Step) GetDependencies() []string
- func (s *Step) GetEnviron() map[string]string
- func (s *Step) GetErrPolicy() runtime.ErrPolicy
- func (s *Step) GetImage() string
- func (s *Step) GetName() string
- func (s *Step) GetRunPolicy() runtime.RunPolicy
- func (s *Step) GetSecretAt(i int) runtime.Secret
- func (s *Step) GetSecretLen() int
- func (s *Step) IsDetached() bool
- func (s *Step) SetEnviron(env map[string]string)
- type Volume
- type VolumeDevice
- type VolumeEmptyDir
- type VolumeHostPath
- type VolumeMount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
Address string `json:"address,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
Auth defines dockerhub authentication credentials.
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker implements a Docker pipeline engine.
type Network ¶
type Network struct {
ID string `json:"id,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Options map[string]string `json:"options,omitempty"`
}
Network that is created and attached to containers
type Platform ¶
type Platform struct {
OS string `json:"os,omitempty"`
Arch string `json:"arch,omitempty"`
Variant string `json:"variant,omitempty"`
Version string `json:"version,omitempty"`
}
Platform defines the target platform.
type PullPolicy ¶
type PullPolicy int
PullPolicy defines the container image pull policy.
const ( PullDefault PullPolicy = iota PullAlways PullIfNotExists PullNever )
PullPolicy enumeration.
func (*PullPolicy) MarshalJSON ¶
func (p *PullPolicy) MarshalJSON() ([]byte, error)
MarshalJSON marshals the string representation of the pull type to JSON.
func (PullPolicy) String ¶
func (p PullPolicy) String() string
func (*PullPolicy) UnmarshalJSON ¶
func (p *PullPolicy) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the json representation of the pull type from a string value.
type Secret ¶
type Secret struct {
Name string `json:"name,omitempty"`
Env string `json:"env,omitempty"`
Data []byte `json:"data,omitempty"`
Mask bool `json:"mask,omitempty"`
}
Secret represents a secret variable.
type Spec ¶
type Spec struct {
Platform Platform `json:"platform,omitempty"`
Steps []*Step `json:"steps,omitempty"`
Internal []*Step `json:"internal,omitempty"`
Volumes []*Volume `json:"volumes,omitempty"`
Network Network `json:"network"`
}
Spec provides the pipeline spec. This provides the required instructions for reproducible pipeline execution.
type Step ¶
type Step struct {
ID string `json:"id,omitempty"`
Auth *Auth `json:"auth,omitempty"`
Command []string `json:"args,omitempty"`
CPUPeriod int64 `json:"cpu_period,omitempty"`
CPUQuota int64 `json:"cpu_quota,omitempty"`
CPUSet []string `json:"cpu_set,omitempty"`
Detach bool `json:"detach,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
Devices []*VolumeDevice `json:"devices,omitempty"`
DNS []string `json:"dns,omitempty"`
DNSSearch []string `json:"dns_search,omitempty"`
Entrypoint []string `json:"entrypoint,omitempty"`
Envs map[string]string `json:"environment,omitempty"`
ErrPolicy runtime.ErrPolicy `json:"err_policy,omitempty"`
ExtraHosts []string `json:"extra_hosts,omitempty"`
IgnoreStdout bool `json:"ignore_stderr,omitempty"`
IgnoreStderr bool `json:"ignore_stdout,omitempty"`
Image string `json:"image,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
MemSwapLimit int64 `json:"memswap_limit,omitempty"`
MemLimit int64 `json:"mem_limit,omitempty"`
Name string `json:"name,omitempty"`
Network string `json:"network,omitempty"`
Networks []string `json:"networks,omitempty"`
Privileged bool `json:"privileged,omitempty"`
Pull PullPolicy `json:"pull,omitempty"`
RunPolicy runtime.RunPolicy `json:"run_policy,omitempty"`
Secrets []*Secret `json:"secrets,omitempty"`
ShmSize int64 `json:"shm_size,omitempty"`
User string `json:"user,omitempty"`
Volumes []*VolumeMount `json:"volumes,omitempty"`
WorkingDir string `json:"working_dir,omitempty"`
}
Step defines a pipeline step.
func (*Step) GetDependencies ¶
func (*Step) GetEnviron ¶
func (*Step) GetErrPolicy ¶
func (*Step) GetRunPolicy ¶
func (*Step) GetSecretLen ¶
func (*Step) IsDetached ¶
func (*Step) SetEnviron ¶
type Volume ¶
type Volume struct {
EmptyDir *VolumeEmptyDir `json:"temp,omitempty"`
HostPath *VolumeHostPath `json:"host,omitempty"`
}
Volume that can be mounted by containers.
type VolumeDevice ¶
type VolumeDevice struct {
Name string `json:"name,omitempty"`
DevicePath string `json:"path,omitempty"`
}
VolumeDevice describes a mapping of a raw block device within a container.
type VolumeEmptyDir ¶
type VolumeEmptyDir struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Medium string `json:"medium,omitempty"`
SizeLimit int64 `json:"size_limit,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
VolumeEmptyDir mounts a temporary directory from the host node's filesystem into the container. This can be used as a shared scratch space.
type VolumeHostPath ¶
type VolumeHostPath struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Path string `json:"path,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
ReadOnly bool `json:"read_only,omitempty"`
}
VolumeHostPath mounts a file or directory from the host node's filesystem into your container.
type VolumeMount ¶
VolumeMount describes a mounting of a Volume within a container.
Directories
¶
| Path | Synopsis |
|---|---|
|
shell
Package shell provides functions for converting shell commands to posix shell scripts.
|
Package shell provides functions for converting shell commands to posix shell scripts. |
|
shell/powershell
Package powershell provides functions for converting shell commands to powershell scripts.
|
Package powershell provides functions for converting shell commands to powershell scripts. |