Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgSpec ¶
type ArgSpec struct { Name string `yaml:"name"` Req bool `yaml:"required"` Desc string `yaml:"description"` }
ArgSpec specifies an argument/annotation for a job.
type C ¶
type C struct { DefaultJob string `yaml:"defaultJob"` Rules []*JobStartRule `yaml:"rules"` }
C is the struct we expect to find in the repo root which configures how we build things
func (*C) ShouldRun ¶
func (rc *C) ShouldRun(md *werftv1.JobMetadata) bool
ShouldRun determines based on the repo config if the job should run
func (*C) TemplatePath ¶
func (rc *C) TemplatePath(md *werftv1.JobMetadata) string
TemplatePath returns the path to the job template in the repo
type JobSpec ¶
type JobSpec struct { // Desc describes the purpose of this job spec. Desc string `yaml:"description,omitempty"` // Pod is the actual job spec to start. Prior to deploying this to Kubernetes, we'll run this // as a Go template. Pod *corev1.PodSpec `yaml:"pod"` // Mutex makes job execution exclusive, with new ones canceling the currently running one. // For example: job A is running at the moment, and job B is about to start. If A and B share the // same mutex, B will cancel A. Mutex string `yaml:"mutex,omitempty"` // Args describe annotations which this job expects. This list is only used on the UI when manually // starting the job. // This is list is neither exhaustive (i.e. jobs can use annotations not listed here), nor binding // (i.e. jobs can run even when annotations listed here are not present). What matters for a job to // run is only if Kubernetes accepts the produced podspec. Args []ArgSpec `yaml:"args,omitempty"` // Sidecars list side car containers of the job, i.e. containers // for which we don't wait that they end to end the job. Sidecars []string `yaml:"sidecars,omitempty"` // Plugins list plugin-specific information Plugins map[string]string `yaml:"plugins,omitempty"` }
JobSpec is the format of the files we expect to find when starting jobs
type JobStartRule ¶
type JobStartRule struct { Path string `yaml:"path"` Expr []*werftv1.FilterExpression `yaml:"matchesAll"` }
JobStartRule determines if a job will be started
func (*JobStartRule) UnmarshalYAML ¶
func (r *JobStartRule) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unmarshals the filter expressions
type JobStartRuleOr ¶
type JobStartRuleOr struct {
Or []string `yaml:"or"`
}
JobStartRuleOr contains an "OR'ed" list of conditions which have to match for a job to run
Click to show internal directories.
Click to hide internal directories.