imagerunner

package
v0.122.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatePending   = "Pending"
	StateRunning   = "Running"
	StateSucceeded = "Succeeded"
	StateCancelled = "Cancelled"
	StateFailed    = "Failed"
)

TODO Caution: Final states are not confirmed yet. The different states that a runner can be in.

Variables

View Source
var (
	Kind       = "imagerunner"
	APIVersion = "v1alpha"
)

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 Done

func Done(status string) bool

Done returns true if the runner status is one of DoneStates. False otherwise.

Types

type Auth

type Auth struct {
	User  string `json:"user,omitempty"`
	Token string `json:"token,omitempty"`
}

type Container

type Container struct {
	Name string `json:"name,omitempty"`
	Auth Auth   `json:"auth,omitempty"`
}

type Defaults

type Defaults struct {
	Suite `yaml:",inline" mapstructure:",squash"`
}

type EnvItem

type EnvItem struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type File

type File struct {
	Src string `yaml:"src,omitempty" json:"src"`
	Dst string `yaml:"dst,omitempty" json:"dst"`
}

type FileData

type FileData struct {
	Path string `json:"path,omitempty"`
	Data string `json:"data,omitempty"`
}

type ImagePullAuth

type ImagePullAuth struct {
	User  string `yaml:"user,omitempty" json:"user"`
	Token string `yaml:"token,omitempty" json:"token"`
}

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"` // The only field that's used within 'sauce' is region.
	Suites         []Suite            `yaml:"suites,omitempty" json:"suites"`
	Artifacts      config.Artifacts   `yaml:"artifacts,omitempty" json:"artifacts"`
}

func FromFile

func FromFile(cfgPath string) (Project, error)

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"`
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL