buildbucket

package
v0.0.0-...-6700e38 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package buildbucket implements the interface required to schedule builder requests on the LUCI BuildBucket architecture.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBuilderID

func GenerateBuilderID(project, bucket, builder string, isProd bool) *bb.BuilderID

GenerateBuilderID returns a BuildBucket BuilderID definition for based on the provided arguments. This is aimed to be used only for partner builder generation.

func GetParentBBID

func GetParentBBID() string

GetParentBBID return the private parentBuildBucketID value.

func GetSwarmingParentTaskID

func GetSwarmingParentTaskID() string

GetSwarmingParentTaskID reaches into the env variables for the current swarming task ID.

NOTE: This will only be set to a meaningful value if the binary is run from within a BuildBucket builder.

func NewBBClient

func NewBBClient(ctx context.Context, authOpts *authcli.Flags) (bb.BuildsClient, error)

NewBBClient returns a bb client

func SetParentBuildBucketID

func SetParentBuildBucketID(bbid string) error

SetParentBuildBucketID sets the parentBuildBucketID value for use when building BuildBucket requests.

Types

type Scheduler

type Scheduler interface {
	Schedule(request *bb.ScheduleBuildRequest) (*bb.Build, error)
	GetBuildStatus(buildID int64) (*bb.Build, error)
}

Scheduler interface type describes the BB API functionality connection.

func InitScheduler

func InitScheduler(ctx context.Context, authOpts *authcli.Flags, isProd, dryRun bool) (Scheduler, error)

InitScheduler returns an operable Scheduler interface.

Jump to

Keyboard shortcuts

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