adapter

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package adapter implements a controller that interacts with gerrit instances

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRefs

func CreateRefs(instance, project, branch, baseSHA string, changes ...client.ChangeInfo) (prowapi.Refs, error)

CreateRefs creates refs for a presubmit job from given changes.

Passed in instance must contain https:// prefix.

func LabelsAndAnnotations

func LabelsAndAnnotations(instance string, jobLabels, jobAnnotations map[string]string, changes ...client.ChangeInfo) (labels, annotations map[string]string)

Types

type Change

type Change struct {
	// contains filtered or unexported fields
}

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller manages gerrit changes.

func NewController

func NewController(ctx context.Context, prowJobClient prowv1.ProwJobInterface, op io.Opener,
	ca *config.Agent, cookiefilePath, tokenPathOverride, lastSyncFallback string, workerPoolSize int, inRepoConfigCache *config.InRepoConfigCache) *Controller

NewController returns a new gerrit controller client

func (*Controller) Sync

func (c *Controller) Sync()

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

type LastSyncTracker

type LastSyncTracker interface {
	Current() client.LastSyncState
	Update(client.LastSyncState) error
}

Jump to

Keyboard shortcuts

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