Documentation ¶
Index ¶
- Variables
- func Build(c context.Context, master, builder string, buildNum int) (*resp.MiloBuild, error)
- func DebugBuild(c context.Context, relBuildbotDir string, builder string, buildNum int) (*resp.MiloBuild, error)
- func GetAllBuilders(c context.Context) (*resp.CIService, error)
- func GetBuilder(c context.Context, masterName, builderName string, limit int, ...) (*resp.Builder, error)
- func PubSubHandler(ctx *router.Context)
- type BuildID
- type BuildInfoProvider
- type Prop
- type Service
- func (s *Service) GetBuildbotBuildJSON(c context.Context, req *milo.BuildbotBuildRequest) (*milo.BuildbotBuildJSON, error)
- func (s *Service) GetBuildbotBuildsJSON(c context.Context, req *milo.BuildbotBuildsRequest) (*milo.BuildbotBuildsJSON, error)
- func (s *Service) GetCompressedMasterJSON(c context.Context, req *milo.MasterRequest) (*milo.CompressedMasterJSON, error)
Constants ¶
This section is empty.
Variables ¶
var TestCases = []struct { Builder string Build int }{ {"CrWinGoma", 30608}, {"chromium_presubmit", 426944}, {"newline", 1234}, {"gerritCL", 1234}, {"win_chromium_rel_ng", 246309}, }
We put this here because _test.go files are sometimes not built.
Functions ¶
func Build ¶
Build fetches a buildbot build and translates it into a miloBuild.
func DebugBuild ¶
func DebugBuild(c context.Context, relBuildbotDir string, builder string, buildNum int) (*resp.MiloBuild, error)
DebugBuild fetches a debugging build for testing.
func GetAllBuilders ¶
GetAllBuilders returns a resp.Module object containing all known masters and builders.
func GetBuilder ¶
func GetBuilder(c context.Context, masterName, builderName string, limit int, cursor datastore.Cursor) (*resp.Builder, error)
GetBuilder is the implementation for getting a milo builder page from buildbot.
This gets:
- Current Builds from querying the master json from the datastore.
- Recent Builds from a cron job that backfills the recent builds.
Types ¶
type BuildID ¶
BuildID is buildbots's notion of a Build. See buildsource.ID.
func (*BuildID) Get ¶
Get implements buildsource.ID.
type BuildInfoProvider ¶
type BuildInfoProvider struct { // LogdogClientFunc returns a coordinator Client instance for the supplied // parameters. // // If nil, a production client will be generated. LogdogClientFunc func(c context.Context) (*coordinator.Client, error) }
BuildInfoProvider is a configuration that provides build information.
In a production system, this will be completely defaults. For testing, the various services and data sources may be substituted for testing stubs.
func (*BuildInfoProvider) GetBuildInfo ¶
func (p *BuildInfoProvider) GetBuildInfo(c context.Context, req *milo.BuildInfoRequest_BuildBot, projectHint cfgtypes.ProjectName) (*milo.BuildInfoResponse, error)
GetBuildInfo resolves a Milo protobuf Step for a given BuildBot build.
On failure, it returns a (potentially-wrapped) gRPC error.
This:
- Fetches the BuildBot build JSON from datastore.
- Resolves the LogDog annotation stream path from the BuildBot state.
- Fetches the LogDog annotation stream and resolves it into a Step.
- Merges some operational BuildBot build information into the Step.
type Prop ¶
type Prop struct { Value interface{} Group string }
Prop is a struct used to store a value and group so that we can make a map of key:Prop to pass into parseProp() for the purpose of cross referencing one prop while working on another.
type Service ¶
type Service struct{}
Service is a service implementation that displays BuildBot builds.
func (*Service) GetBuildbotBuildJSON ¶
func (s *Service) GetBuildbotBuildJSON(c context.Context, req *milo.BuildbotBuildRequest) ( *milo.BuildbotBuildJSON, error)
GetBuildbotBuildJSON implements milo.BuildbotServer.
func (*Service) GetBuildbotBuildsJSON ¶
func (s *Service) GetBuildbotBuildsJSON(c context.Context, req *milo.BuildbotBuildsRequest) ( *milo.BuildbotBuildsJSON, error)
GetBuildbotBuildsJSON implements milo.BuildbotServer.
func (*Service) GetCompressedMasterJSON ¶
func (s *Service) GetCompressedMasterJSON(c context.Context, req *milo.MasterRequest) ( *milo.CompressedMasterJSON, error)
GetCompressedMasterJSON assembles a CompressedMasterJSON object from the provided MasterRequest.