buildsource

package
v0.0.0-...-678bb0e Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuilderID

type BuilderID string

BuilderID is the universal ID of a builder, and has the form:

buildbucket/bucket/builder
buildbot/master/builder

func (BuilderID) Get

func (b BuilderID) Get(c context.Context, limit int, cursorStr string) (*resp.Builder, error)

Get allows you to obtain the resp.Builder that corresponds with this BuilderID.

func (BuilderID) Split

func (b BuilderID) Split() (backend, backendGroup, builderName string, err error)

Split breaks the BuilderID into pieces.

  • backend is either 'buildbot' or 'buildbucket'
  • backendGroup is either the bucket or master name
  • builderName is the builder name.

Returns an error if the BuilderID is malformed (wrong # slashes) or if any of the pieces are empty.

type ConsoleRow

type ConsoleRow struct {
	Commit string
	Builds map[BuilderID][]*model.BuildSummary
}

ConsoleRow is one row of a particular console.

It has the git commit for the row, as well as a mapping of BuilderID to any BuildSummaries which reported using this commit.

func GetConsoleRows

func GetConsoleRows(c context.Context, project string, console *common.Console, commits, builders []string) ([]*ConsoleRow, error)

GetConsoleRows returns a row-oriented collection of BuildSummary objects. Each row corresponds to the similarly-indexed commit in the `commits` slice.

type ID

type ID interface {
	Get(c context.Context) (*resp.MiloBuild, error)

	// GetLog is only implemented by swarming; this is for serving the deprecated
	//   swarming/task/<id>/steps/<logname>
	// API. Once that's removed, this should be removed as well.
	GetLog(c context.Context, logname string) (text string, closed bool, err error)
}

ID represents a universal 'build' ID. Each subpackage of buildsource implements an ID (as the type BuildID, e.g. swarming.BuildID), which has buildsource-specific fields, but always implements this ID interface.

The frontend constructs an ID from the appropriate buildsource, then calls its .Get() method to get the generic MiloBuild representation.

Directories

Path Synopsis
internal
Package internal is a generated protocol buffer package.
Package internal is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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