Documentation ¶
Overview ¶
Package buildbucket is a client library for Buildbucket service.
Index ¶
Constants ¶
const ( ExperimentBackendAlt = "luci.buildbucket.backend_alt" ExperimentBackendGo = "luci.buildbucket.backend_go" ExperimentBBAgent = "luci.buildbucket.use_bbagent" ExperimentBBAgentDownloadCipd = "luci.buildbucket.agent.cipd_installation" ExperimentBBAgentGetBuild = "luci.buildbucket.bbagent_getbuild" ExperimentBBCanarySoftware = "luci.buildbucket.canary_software" ExperimentBqExporterGo = "luci.buildbucket.bq_exporter_go" ExperimentNonProduction = "luci.non_production" ExperimentParentTracking = "luci.buildbucket.parent_tracking" ExperimentWaitForCapacity = "luci.buildbucket.wait_for_capacity_in_slices" )
Well-known experiment strings.
See the Builder.experiments field documentation.
const BuildTokenHeader = "x-build-token"
BuildTokenHeader is the old name of the gRPC metadata header indicating the build token (see BuildSecrets.BuildToken). It is still used by `kitchen`, but is otherwise deprecated in favor of BuildbucketTokenHeader for all uses.
DEPRECATED
const BuildbucketTokenHeader = "x-buildbucket-token"
BuildbucketTokenHeader is the name of gRPC metadata header indicating a buildbucket token.
Tokens include an authenticatable purpose field, we only need one header for all incoming RPCs.
const DummyBuildbucketToken = "dummy token"
DummyBuildbucketToken is the dummy token for led builds.
const MinUpdateBuildInterval = 30 * time.Second
MinUpdateBuildInterval is the minimum interval bbagent should call UpdateBuild.
Variables ¶
var ( // DuplicateTask means the backend has created multiple tasks for the same build. // After the build has associated with one of those tasks (either by StartBuild or RegisterBuildTask), // requests of associating other tasks with the build will fail with this error. DuplicateTask = errors.BoolTag{Key: errors.NewTagKey("duplicate_backend_task")} // TaskWithCollidedRequestID the backend has created multiple tasks for the same build, // and two tasks among them have generated the same request_id for calling RegisterBuildTask. TaskWithCollidedRequestID = errors.BoolTag{Key: errors.NewTagKey("task_with_collided_request_id")} )
var ( // DisallowedAppendTagKeys is the set of tag keys which cannot be set via // UpdateBuild. Clients calling UpdateBuild must strip these before making // the request. DisallowedAppendTagKeys = stringset.NewFromSlice("build_address", "buildset", "builder") )
Functions ¶
func WithoutDisallowedTagKeys ¶
func WithoutDisallowedTagKeys(tags []*pb.StringPair) []*pb.StringPair
WithoutDisallowedTagKeys returns tags whose key are not in `DisallowedAppendTagKeys`.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
appengine
|
|
common
Package common contains common code used throughout buildbucket appengine code.
|
Package common contains common code used throughout buildbucket appengine code. |
common/buildcel
Package buildcel provides go/cel support for Build proto.
|
Package buildcel provides go/cel support for Build proto. |
frontend
Package main is the main entry point for the app.
|
Package main is the main entry point for the app. |
internal/buildcron
Package buildcron implements various cron handlers for build entities.
|
Package buildcron implements various cron handlers for build entities. |
internal/buildercron
Package buildercron implements cron handlers for Builder entities
|
Package buildercron implements cron handlers for Builder entities |
internal/buildid
Package buildid provides the build id computation related functions.
|
Package buildid provides the build id computation related functions. |
internal/buildstatus
Package buildstatus provides the build status computation related functions.
|
Package buildstatus provides the build status computation related functions. |
internal/buildtoken
Package buildtoken provide related functions for dealing with build tokens.
|
Package buildtoken provide related functions for dealing with build tokens. |
internal/clients
Package clients contains wrappers for client side bindings for APIs used by Buildbucket.
|
Package clients contains wrappers for client side bindings for APIs used by Buildbucket. |
internal/compression
Package compression provides different compression and decompression functions for the usages in the buildbucket.
|
Package compression provides different compression and decompression functions for the usages in the buildbucket. |
internal/config
Package config contains the interactions with the configuration service for global configuration files including reading, validating, etc.
|
Package config contains the interactions with the configuration service for global configuration files including reading, validating, etc. |
internal/internalcontext
Package internalcontext contains a function to store custom metrics in context.
|
Package internalcontext contains a function to store custom metrics in context. |
internal/metrics
Package metrics defines metrics for various build events, and utility functions to be used in other modules for the metric updates.
|
Package metrics defines metrics for various build events, and utility functions to be used in other modules for the metric updates. |
internal/perm
Package perm implements permission checks.
|
Package perm implements permission checks. |
internal/redirect
Package redirect handles the URLs which need a redirection.
|
Package redirect handles the URLs which need a redirection. |
model
Package model contains datastore model implementation.
|
Package model contains datastore model implementation. |
model/defs
Package modeldefs contains messages used by Buildbucket data model.
|
Package modeldefs contains messages used by Buildbucket data model. |
monitor
Package main is the main entry point for the app.
|
Package main is the main entry point for the app. |
rpc
Package rpc contains rpc service implementation.
|
Package rpc contains rpc service implementation. |
rpc/testutil
Package testutil contains util functions for testing buildbucket RPCs.
|
Package testutil contains util functions for testing buildbucket RPCs. |
taskbackendlite
Package main is the main entry point for the app.
|
Package main is the main entry point for the app. |
tasks
Package tasks contains task queue implementations.
|
Package tasks contains task queue implementations. |
tasks/defs
Package taskdefs contains task queue task definitions.
|
Package taskdefs contains task queue task definitions. |
Package bbperms contains a list of registered buildbucket Realm permissions.
|
Package bbperms contains a list of registered buildbucket Realm permissions. |
Package cli implements CLI client for buildbucket service.
|
Package cli implements CLI client for buildbucket service. |
cmd
|
|
bbagent
Command bbagent is Buildbucket's agent running in swarming.
|
Command bbagent is Buildbucket's agent running in swarming. |
dump_build
Command dump_build is a simple CLI debugging toolV which reads a binary Build message (with optional zlib compression) and then dumps the decoded build as JSONPB to stdout.
|
Command dump_build is a simple CLI debugging toolV which reads a binary Build message (with optional zlib compression) and then dumps the decoded build as JSONPB to stdout. |
Package bbmetrics contains metric related models shared between LUCI services.
|
Package bbmetrics contains metric related models shared between LUCI services. |
Package buildbucketpb is generated from Buildbucket .proto files.
|
Package buildbucketpb is generated from Buildbucket .proto files. |
Package protoutil provides utility functions for protobuf messages in ../proto package.
|
Package protoutil provides utility functions for protobuf messages in ../proto package. |