Documentation
¶
Overview ¶
Package bb provides a buildbucket Client with helper methods for interacting with builds.
Index ¶
- type Build
- type Client
- func (c *Client) BuildURL(buildID int64) string
- func (c *Client) GetBuild(ctx context.Context, ID int64) (*Build, error)
- func (c *Client) ScheduleCTPBuild(ctx context.Context, requests map[string]*test_platform.Request, tags []string) (int64, error)
- func (c *Client) ScheduleDUTLeaserBuild(ctx context.Context, dims map[string]string, tags []string, length int32) (int64, error)
- func (c *Client) SearchBuildsByTags(ctx context.Context, limit int, tags ...string) ([]*Build, error)
- func (c *Client) WaitForBuild(ctx context.Context, ID int64) (*Build, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { ID int64 DUTName string Builder *buildbucket_pb.BuilderID Status buildbucket_pb.Status // Tags strings of the form "key:value" Tags []string // Response may be nil if the output properties of the build do not contain // a response. Response *steps.ExecuteResponse // Responses may be nil if the output properties of the build do not contain // a responses field. Responses *steps.ExecuteResponses // Request may be nil if the output properties of the build do not contain a // request field. Request *test_platform.Request // Requests may be nil if the output properties of the build do not contain // a requests field. Requests map[string]*test_platform.Request // BackfillRequests may be nil if the output properties of the build do not // contain a backfill_requests field. BackfillRequests map[string]*test_platform.Request }
Build contains selected state information from a fetched buildbucket Build.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides helper methods to interact with buildbucket builds.
func NewClient ¶
func NewClient(ctx context.Context, builderInfo site.BuildbucketBuilderInfo, authFlags authcli.Flags) (*Client, error)
NewClient returns a new client to interact with buildbucket builds from the given builder.
func (*Client) ScheduleCTPBuild ¶
func (c *Client) ScheduleCTPBuild(ctx context.Context, requests map[string]*test_platform.Request, tags []string) (int64, error)
ScheduleCTPBuild schedules a new cros_test_platform build.
ScheduleCTPBuild returns the buildbucket build ID for the scheduled build on success. ScheduleCTPBuild does not wait for the scheduled build to start.
func (*Client) ScheduleDUTLeaserBuild ¶
func (c *Client) ScheduleDUTLeaserBuild(ctx context.Context, dims map[string]string, tags []string, length int32) (int64, error)
ScheduleDUTLeaserBuild schedules a new dut_leaser build and returns the buildbucket build ID for the scheduled build on success, without waiting for the scheduled build to start.