gerrit

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package gerrit implements a gerrit-fetcher using https://github.com/andygrunwald/go-gerrit

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 gerrit changes.

func NewController

func NewController(instance, storage string, projects []string, kc *kube.Client, ca *config.Agent) (*Controller, error)

NewController returns a new gerrit controller client

func (*Controller) Auth

func (c *Controller) Auth() error

Auth authenticates to gerrit server Token will expire, so we need to regenerate it once so often

func (*Controller) ProcessChange

func (c *Controller) ProcessChange(change gerrit.ChangeInfo) error

ProcessChange creates new presubmit prowjobs base off the gerrit changes

func (*Controller) QueryChanges

func (c *Controller) QueryChanges() []gerrit.ChangeInfo

QueryChanges will query all valid gerrit changes since controller's last sync loop

func (*Controller) SaveLastSync

func (c *Controller) SaveLastSync(lastSync time.Time) error

SaveLastSync saves last sync time in Unix to a volume

func (*Controller) Sync

func (c *Controller) Sync() error

Sync looks for newly made gerrit changes and creates prowjobs according to presubmit specs

Jump to

Keyboard shortcuts

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