Documentation ¶
Index ¶
- Constants
- Variables
- func Done(status string) bool
- func FilterSuites(p *Project, suiteName string) error
- func SetDefaults(p *Project)
- func Validate(p Project) error
- type ArtifactList
- type Auth
- type Container
- type Defaults
- type EnvItem
- type File
- type FileData
- type ImagePullAuth
- type Project
- type Runner
- type RunnerSpec
- type Suite
- type Tunnel
Constants ¶
View Source
const ( StateUnknown = "Unknown" StatePending = "Pending" StateRunning = "Running" StateUploading = "Uploading" StateSucceeded = "Succeeded" StateCancelled = "Cancelled" StateFailed = "Failed" StateTerminated = "Terminated" )
The different states that a runner can be in.
Variables ¶
View Source
var ( Kind = "imagerunner" APIVersion = "v1alpha" ValidWorkloadType = []string{ "webdriver", "other", } ValidResourceProfilesFormat = "cXmX" ValidResourceProfilesValidator = regexp.MustCompile("^c([0-9]+)m([0-9]+)$") )
View Source
var DoneStates = []string{StateSucceeded, StateCancelled, StateFailed, StateTerminated}
DoneStates represents states that a runner doesn't transition out of, i.e. once the runner is in one of these states, it's done.
View Source
var ErrResourceNotFound = errors.New("resource not found")
Functions ¶
func FilterSuites ¶ added in v0.137.0
FilterSuites filters out suites in the project that don't match the given suite name.
func SetDefaults ¶ added in v0.135.0
func SetDefaults(p *Project)
SetDefaults applies config defaults in case the user has left them blank.
Types ¶
type ArtifactList ¶ added in v0.133.0
type ImagePullAuth ¶
type Project ¶
type Project struct { config.TypeDef `yaml:",inline" mapstructure:",squash"` Defaults Defaults `yaml:"defaults" json:"defaults"` Sauce config.SauceConfig `yaml:"sauce,omitempty" json:"sauce"` // Used fields are `region` and `tunnel`. Suites []Suite `yaml:"suites,omitempty" json:"suites"` Artifacts config.Artifacts `yaml:"artifacts,omitempty" json:"artifacts"` DryRun bool `yaml:"-" json:"-"` Env map[string]string `yaml:"env,omitempty" json:"env"` }
type Runner ¶
type Runner struct { ID string `json:"id,omitempty"` Status string `json:"status,omitempty"` Image string `json:"image,omitempty"` CreationTime int64 `json:"creation_time,omitempty"` TerminationTime int64 `json:"termination_time,omitempty"` TerminationReason string `json:"termination_reason,omitempty"` }
type RunnerSpec ¶
type RunnerSpec struct { Container Container `json:"container,omitempty"` EntryPoint string `json:"entrypoint,omitempty"` Env []EnvItem `json:"env,omitempty"` Files []FileData `json:"files,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` Artifacts []string `json:"artifacts,omitempty"` WorkloadType string `json:"workload_type,omitempty"` Tunnel *Tunnel `json:"tunnel,omitempty"` }
type Suite ¶
type Suite struct { Name string `yaml:"name,omitempty" json:"name"` Image string `yaml:"image,omitempty" json:"image"` ImagePullAuth ImagePullAuth `yaml:"imagePullAuth,omitempty" json:"imagePullAuth"` EntryPoint string `yaml:"entrypoint,omitempty" json:"entrypoint"` Files []File `yaml:"files,omitempty" json:"files"` Artifacts []string `yaml:"artifacts,omitempty" json:"artifacts"` Env map[string]string `yaml:"env,omitempty" json:"env"` Timeout time.Duration `yaml:"timeout,omitempty" json:"timeout"` Workload string `yaml:"workload,omitempty" json:"workload,omitempty"` ResourceProfile string `yaml:"resourceProfile,omitempty" json:"resourceProfile,omitempty"` Metadata map[string]string `yaml:"metadata,omitempty" json:"metadata,omitempty"` }
Click to show internal directories.
Click to hide internal directories.