Documentation ¶
Overview ¶
Package config knows how to read and parse config.yaml.
Index ¶
- type Agent
- type Brancher
- type Config
- func (c *Config) AllPeriodics() []string
- func (c *Config) AllPostsubmits() []string
- func (c *Config) AllPresubmits() []string
- func (c *Config) MatchingPresubmits(fullRepoName, body string, testAll *regexp.Regexp) []Presubmit
- func (c *Config) RetestPresubmits(fullRepoName string, skipContexts, runContexts map[string]bool) []Presubmit
- func (c *Config) SetPresubmits(jobs map[string][]Presubmit) error
- type Periodic
- type Plank
- type Postsubmit
- type Presubmit
- type Trigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
Agent watches a path and automatically loads the config stored therein.
type Brancher ¶
type Brancher struct { // Do not run against these branches. Default is no branches. SkipBranches []string `json:"skip_branches"` // Only run against these branches. Default is all branches. Branches []string `json:"branches"` }
Brancher is for shared code between jobs that only run against certain branches. An empty brancher runs against all branches.
func (Brancher) RunsAgainstBranch ¶
type Config ¶
type Config struct { // Full repo name (such as "kubernetes/kubernetes") -> list of jobs. Presubmits map[string][]Presubmit `json:"presubmits,omitempty"` Postsubmits map[string][]Postsubmit `json:"postsubmits,omitempty"` // Periodics are not associated with any repo. Periodics []Periodic `json:"periodics,omitempty"` Plank Plank `json:"plank,omitempty"` Triggers []Trigger `json:"triggers,omitempty"` }
Config is a read-only snapshot of the config.
func (*Config) AllPeriodics ¶
func (*Config) AllPostsubmits ¶
func (*Config) AllPresubmits ¶
func (*Config) MatchingPresubmits ¶
func (*Config) RetestPresubmits ¶
func (c *Config) RetestPresubmits(fullRepoName string, skipContexts, runContexts map[string]bool) []Presubmit
RetestPresubmits returns all presubmits that should be run given a /retest command. This is the set of all presubmits intersected with ((alwaysRun + runContexts) - skipContexts)
type Periodic ¶
type Periodic struct { Name string `json:"name"` Spec *kube.PodSpec `json:"spec,omitempty"` Interval string `json:"interval"` Tags []string `json:"tags,omitempty"` RunAfterSuccess []Periodic `json:"run_after_success"` // contains filtered or unexported fields }
Periodic runs on a timer.
func (*Periodic) GetInterval ¶
func (*Periodic) SetInterval ¶
type Plank ¶
type Plank struct { // JobURLTemplateString compiles into JobURLTemplate at load time. JobURLTemplateString string `json:"job_url_template,omitempty"` // JobURLTemplate is compiled at load time from JobURLTemplateString. It // will be passed a kube.ProwJob and is used to set the URL for the // "details" link on GitHub as well as the link from deck. JobURLTemplate *template.Template `json:"-"` // ReportTemplateString compiles into ReportTemplate at load time. ReportTemplateString string `json:"report_template,omitempty"` // ReportTemplate is compiled at load time from ReportTemplateString. It // will be passed a kube.ProwJob and can provide an optional blurb below // the test failures comment. ReportTemplate *template.Template `json:"-"` }
Plank is config for the plank controller.
type Postsubmit ¶
type Postsubmit struct { Name string `json:"name"` Spec *kube.PodSpec `json:"spec,omitempty"` Brancher RunAfterSuccess []Postsubmit `json:"run_after_success"` }
Postsubmit runs on push events.
type Presubmit ¶
type Presubmit struct { // eg kubernetes-pull-build-test-e2e-gce Name string `json:"name"` // Run for every PR, or only when a comment triggers it. AlwaysRun bool `json:"always_run"` // Run if the PR modifies a file that matches this regex. RunIfChanged string `json:"run_if_changed"` // Context line for GitHub status. Context string `json:"context"` // eg @k8s-bot e2e test this Trigger string `json:"trigger"` // Valid rerun command to give users. Must match Trigger. RerunCommand string `json:"rerun_command"` // Whether or not to skip commenting and setting status on GitHub. SkipReport bool `json:"skip_report"` // Kubernetes pod spec. Spec *kube.PodSpec `json:"spec,omitempty"` // Run these jobs after successfully running this one. RunAfterSuccess []Presubmit `json:"run_after_success"` Brancher // contains filtered or unexported fields }
Presubmit is the job-specific trigger info.
func (Presubmit) RunsAgainstChanges ¶
type Trigger ¶
type Trigger struct { // Repos is either of the form org/repos or just org. Repos []string `json:"repos,omitempty"` // TrustedOrg is the org whose members' PRs will be automatically built // for PRs to the above repos. TrustedOrg string `json:"trusted_org,omitempty"` }
Trigger is config for the trigger plugin.