Documentation ¶
Index ¶
- Constants
- type Engine
- func (e *Engine) Destroy(ctx context.Context, specv runtime.Spec) error
- func (e *Engine) Ping(ctx context.Context) error
- func (e *Engine) Run(ctx context.Context, specv runtime.Spec, stepv runtime.Step, output io.Writer) (*runtime.State, error)
- func (e *Engine) Setup(ctx context.Context, specv runtime.Spec) error
- type File
- type MachineConfig
- type Opts
- type Secret
- type Settings
- 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) 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)
Constants ¶
View Source
const BOOT_MAX_DELAY time.Duration = 3 * time.Minute
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct { ImageDir string TempDir string MachineConfig MachineConfig Image string SshPort int QemuProcess *os.Process QemuProcessExitChan chan struct{} }
Engine implements a pipeline engine.
type File ¶
type File struct { Path string `json:"path,omitempty"` Mode uint32 `json:"mode,omitempty"` Data []byte `json:"data,omitempty"` IsDir bool `json:"is_dir,omitempty"` }
File defines a file that should be uploaded or mounted somewhere in the step container or virtual machine prior to command execution.
type MachineConfig ¶
type MachineConfig struct { Username string `json:"username,omitempty"` BaseImage string `json:"base_image,omitempty"` BaseImageFormat string `json:"base_image_format,omitempty"` }
Machine configuration, loaded from JSON
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 Settings ¶
type Settings struct {
Image string `json:"image,omitempty"`
}
Settings provides pipeline settings.
type Spec ¶
type Spec struct { Root string `json:"root,omitempty"` Settings Settings `json:"settings,omitempty"` Files []*File `json:"files,omitempty"` Steps []*Step `json:"steps,omitempty"` }
Spec provides the pipeline spec. This provides the required instructions for reproducible pipeline execution.
type Step ¶
type Step struct { Args []string `json:"args,omitempty"` Command string `json:"command,omitempty"` Detach bool `json:"detach,omitempty"` DependsOn []string `json:"depends_on,omitempty"` ErrPolicy runtime.ErrPolicy `json:"err_policy,omitempty"` Envs map[string]string `json:"environment,omitempty"` Files []*File `json:"files,omitempty"` Name string `json:"name,omitempt"` RunPolicy runtime.RunPolicy `json:"run_policy,omitempty"` Secrets []*Secret `json:"secrets,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 ¶
Click to show internal directories.
Click to hide internal directories.