Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller manages ProwJobs.
func NewController ¶
func NewController(kc *kube.Client, pkcs map[string]*kube.Client, ghc GitHubClient, logger *logrus.Entry, ca *config.Agent, totURL, selector string, skipReport bool) (*Controller, error)
NewController creates a new Controller from the provided clients.
func (*Controller) RunAfterSuccessCanRun ¶
func (c *Controller) RunAfterSuccessCanRun(parent, child *kube.ProwJob, ca configAgent, ghc GitHubClient) bool
RunAfterSuccessCanRun returns whether a child job (specified as run_after_success in the prow config) can run once its parent job succeeds. The only case we will not run a child job is when it is a presubmit job and has a run_if_changed regular expression specified which does not match the changed filenames in the pull request the job was meant to run for. TODO: Collapse with Jenkins, impossible to reuse as is due to the interfaces.
func (*Controller) SyncMetrics ¶
func (c *Controller) SyncMetrics()
SyncMetrics records metrics for the cached prowjobs.
type GitHubClient ¶
type GitHubClient interface { BotName() (string, error) CreateStatus(org, repo, ref string, s github.Status) error ListIssueComments(org, repo string, number int) ([]github.IssueComment, error) CreateComment(org, repo string, number int, comment string) error DeleteComment(org, repo string, ID int) error EditComment(org, repo string, ID int, comment string) error GetPullRequestChanges(org, repo string, number int) ([]github.PullRequestChange, error) }
GitHubClient contains the methods used by plank on k8s.io/test-infra/prow/github.Client Plank's unit tests implement a fake of this.