luci: go.chromium.org/luci/milo/buildsource Index | Files | Directories

package buildsource

import "go.chromium.org/luci/milo/buildsource"

Index

Package Files

builder.go console.go id.go

func GetConsoleSummariesFromDefs Uses

func GetConsoleSummariesFromDefs(c context.Context, consoleEnts []*common.Console, projectID string) (
    map[common.ConsoleID]*ui.BuilderSummaryGroup, error)

GetConsoleSummariesFromDefs returns a map of consoleID -> summary from the datastore using a slice of console definitions as input.

This expects all builders in all consoles coming from the same projectID.

type BuilderID Uses

type BuilderID string

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

buildbucket/bucket/builder
buildbot/master/builder

func (BuilderID) Buildbot Uses

func (b BuilderID) Buildbot() bool

Buildbot returns true iff this BuilderID originates from a buildbot builder.

func (BuilderID) Get Uses

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

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

func (b BuilderID) SelfLink(project string) string

SelfLink returns LUCI URL of the builder.

func (BuilderID) Split Uses

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 Uses

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

ConsoleRow is one row of a particular console.

It has the git commit for the row, as well as a mapping of column index to the Builds associated with it for this commit. The columns are defined by the order of the Builder messages in the Console config message (one column per Builder message).

Builds is a map since most commit rows have a small subset of the available builders.

func GetConsoleRows Uses

func GetConsoleRows(c context.Context, project string, console *config.Console, commits []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 Uses

type ID interface {
    Get(c context.Context) (*ui.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

PathSynopsis
buildbot
buildbot/buildstorePackage buildstore implements storage of //milo/api/buildbot/* types.
buildbucket
rawpresentation
rawpresentation/internal
swarming

Package buildsource imports 15 packages (graph) and is imported by 2 packages. Updated 2018-08-21. Refresh now. Tools for package owners.